???????????Щ?????????????????????????????????????????????????????????????????????????????????????????
????1. System.exit(0)??????finally??????
System.setSecurityManager(new SecurityManager() {
@Override
public void checkExit(int status) {
throw new ThreadDeath();
}
});
try {
System.exit(0);
} finally {
System.out.println("In the finally block");
}
??????δ???????????In the finally block???????д?????????????????
????2. String str = “Hello”;????str?????????????? ??C++????????Java?????????????????????????á????????????????????ζ???????????????
????String str = "Hello";
????String text = "Bye";
????str == text; // ??????????????????????
????str = text; // ??text??????????str
???????????????????????????????????д????????????
????final StringBuilder sb = new StringBuidler();
????sb.append("Hello"); // ?????????final????????????????????
????method(sb); // ????????????????????????????????????????????
????3. Java?????й???C++????????????
???????й?????????????????”??????????У?????????????????????????? ??????????й???????????????У????????е?????????????????з??????????????????й???” ??????Java?У???????????????Щ??????????????????????й??????????Java????ζ???????д?????????????????????????Щ??????????????洢??????С?
????4. ??????????
???????????о??????????????????????????????????????????????????У?????????????????????????????????? ????????????????????????????????????????Щ????е???????????????????????ü??????????????????????????????е?????????????????????:-)
????5. ???ù??????????????????
??????????и????????漰????????????????????????????????????????????????Щ???????棬??????????????????????????????????????????????????????????????????Щ?????????????滻???? ??????????????????????????????????????滻????Щ??????????????????????????飬????????????????????????????????????????????????????????? ??????
????6. ??????????????
?????????????????????????????????????????????????????????????????????????????????????????????????????????????
????7. ??t???????????????????????????????????
?????????????????????????????ζ???????????????????????????????????????????????????????????????????????Щ?????????????????????????????????????????????????BigDecimal??????????????????????????Ч??????????????????????????????????????
????8. ????????????
?????????????????????????????????仯?????????????????ζ?????/????????????????1970/1/1 01:00??????00:00???????????????1968??1971????????????????????????????
????????????Щ?????棬???в?????????????仯??ī???????????????GMT+3?????????????????GMT+4??????2011??3??27???????????????2010?????????????????????????????????
????????Щ???????????????о???????
????1721???????2????30??
????1751????????????3??25??????????????11??
???????????ù????????????????????????????????????Щ????????????????????????б??????????????????????????????????????λ??????????1731??2??11?????1732??2??22??
????9. ??????????ж???????volatile????????????????????μ???????
??????????????????StackOverflow?????????????????????JIT??????????????????????????????????volatile???????ν??????????????????????????????????-XX:+PrintCompilation??????????????????????????ν??е??????????????????????????????????????????????????????????????У?????????JIT??????????????????????????
????10. Java?????????????
?????к??Java???????????????????10????и?????????????Java?汾??????????????????????????????????????????Щ??????м??????????????????
???????ο?Stackoverflow??????????????????????????????Щ????????????rose india????????????????????????????????????????????????????????????????????????????ж????д????????????????????????????????????Щ???????????????????????Ч?????????????????Щ????