Java??????????????????
???????????? ???????[ 2012/11/28 10:01:00 ] ????????
??????Java?????У???????????Щ?????????????Щ?????????????????????????????Щ???????ι???????????????????
????1??????????
????????
??????????????????????磺???????????????????????????????import????????????????????????????????Ρ???????????????????????????IDE???????warn??
???????
????д?????????????import?????????????в????????滻????????????????????????????????
???????
???????????????????????????????JDK?е???????????????????????????????????????????????????????????
????2???????API
????????
????????????API?????????????????????????????????????o??????Щ????
??????????flag??true??
boolean flag = Boolean.getBoolean("true");
????????????false??
???????????????????????????2012?????????????????????2012??
Calendar calendar = GregorianCalendar.getInstance();
calendar.roll(Calendar.DAY_OF_YEAR?? -365);
???????????????
calendar.add(Calendar.DAY_OF_YEAR?? -365);
?????????
??????????????????????????????????????????API? ??????????????????????????????£?
Boolean.valueOf(b) VS Boolean.parseBoolean(b) VS Boolean.getBoolean(b);
???????
????????????????????????????????????????????????ЩAPI????????????????????????API??
????3????????????????
????????
???????????????????????????????
??????????
long x=Integer.MAX_VALUE+1;
System.out.println(x);
????x???????????-2147483648??????????1?????long???Χ??????????????????????
????1×????2×????3…
???????????
?????????????????????У???У??????????????ò???number?? ?????????????С??0??????????????£?
Number i=Long.MAX_VALUE;
System.out.println(i.intValue()>0);
???????
????1????????????????long??????????L????l????????Сд???l???????????1??????????
????2????????????????????????????doubleValue()??????????BigDecimal??????????????????
???????
?????????????????????У??漰??????????????????漰????????????????0????????????????????BigDecimal???
????4????????????
????????
????????????log?????????????????
?????????????stack trace??
} catch (Exception ex) {
log.error(ex);
}
????????????????log??
} catch (ConfigurationException e) {
e.printStackTrace();
}
???????
????1???滻??log.error(ex.getMessage()??ex);
????2???????????log4j?????????System.out??
???????
????1??API??????????????????????????????log.error(Exception)?????д?????
????2???????????У??????Щ??????????????Ч?????e.printStackTrace()????????(Console)?????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11