* [????](#????) * [ final](#-final) * [????????](#????????) * [???????](#???????) * [????](#????) * [Set](#set) * [Queue](#queue) * [Map](#map) * [????](#????) * [??](#??) * [?羊?????](#?羊?????) # ???? ## final **final ????** ?????????????????????????????????????????????????????????????????? ????????????final ???????????????????final ????辰????????????????????????????????????????????? **final ????** ???????????????????? private ?????????????? final????????????忪?????????????快???? private ???????????????????????????????????????????????? **final ??** ????????????妊? ## ???????? static ??????????????????????????????????????????????????曳?????????????????????? ```java public static String staticField = "???????"; ``` static ????? static ???????????????????????????曳?????????????????????????????快???? ```java static { System.out.println("??????????"); } ``` ?????????????????????????????????????????????? ```java public String field = "????"; ``` ```java { System.out.println("???????"); } ``` ????????????快???????忍???? ```java public InitialOrderTest() { System.out.println("??????"); } ``` ?????快?????????????????? 1. ?????????????????? 2. ?????????????????? 3. ???????????? 4. ???????????? 5. ???????????? 6. ???????????? ## ??????? Java ??????????????????灰???private??protected ??? public???????????????灰??????????????? ???????????快???????????????????????????灰??????????????????????車?????????????????車????????????????????????????????????????????快?????????????????????????????????? protected ???????污???????????????忍????????????????????????????灰????????????????????技??????? # ???? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/114c49a6-72e3-4264-ae07-c564127094ac.png) ??????????? Collection ?? Map ?????Collection ??????? List??Set ??? Queue?? ## Set - HashSet????? Hash ??????????????????????????? - TreeSet?????????????????????????完????? HashSet?? - LinkedListHashSet?????? HashSet ?????完????????????????????????????????????????? ## Queue ???????????LinkedList ?? PriorityQueue?????? LinkedList ????????妊? ## Map - HashMap????? Hash ??? - LinkedHashMap???????????????????????????????????LRU????? - TreeMap????????????? - ConcurrentHashMap??????? Map?????p??????? # ???? ?????????? **Class** ??????????????抄???????????????????????????????????? .class ??????????????????? Class ???? ????????? Class ?????????????????????????????? JVM ?孝???????? Class.forName('com.mysql.jdbc.Driver.class') ????????????????????‾?????????? Class ???? ???????????????????????????????????????????????????????????????????? .class ??????????????????? Class ?? java.lang.reflect ???????????????java.lang.reflect ???????? **Field**??**Method** ??? **Constructor** ????????? get() ?? set() ???????????? Field ???????????曳???????? invoke() ?????????? Method ???????????????????? Constructor ?????????? IDE ??‾???????????????????????????????????????????曲??????????????????忍??????????? # ?? Throwable ????????????百羊???????????????????????**Error** ?? **Exception**?????? Error ?????????????????? Exception ????????**?????** ?? **???????**???????????? try...catch... ???????忱??????????????抖?????????????????????????????? 0 ?????? Arithmetic Exception??????????????????????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/48f8f98e-8dfd-450d-8b5b-df4688f0d377.jpg) # ?羊????? - Eckel B, ????? , ??? , ?? . Java ?????? [M]. ??快????????? , 2002. - [Java ????????? ](https://segmentfault.com/a/1190000004527951)