2017骞磈ava寮�鍙戣亴浣嶉潰璇曢鍗佸垎绫绘眹鎬� java闈㈣瘯绂忓埄

1銆乯ava鍏ラ棬

涓�銆佸瓧绗︿覆绫诲瀷鍙峰瀷鍙蜂负浠�涓嶈繕鏄痜inal鐨勩��

浜屻�丠ash鍦板浘鐨勪唬鐮侊紝瀹炵幇鐞嗚锛屽簳灞傜粨鏋勩��

涓夈�佽璁叉偍鐭ラ亾鐨勫嚑涓�涓�涓猨ava闆嗗悎绫诲瀷鍙峰瀷鍙凤細list銆乻et銆乹ueue銆佸湴鍥惧疄鐜扮被鍨嬪彿鍨嬪彿鍜�傘�傘��

鍥涖�佹弿杩颁竴涓婣rrayList鎴朙inkedList鍚勮嚜瀹炵幇鎴栦笉涓�鏍�

浜斻�乯ava涓殑闃熷垪鍖呮嫭閭g锛屾湁浠�涓嶄笉涓�鏍枫��

鍏�佸弽灏勪腑锛孋lass.forName鎴朿lassloader鐨勪笉涓�鏍�

涓冦�乯ava涓冦�乯ava鍏殑鏂扮壒鎬�(baidu闂殑,濂紹T)

鍏�乯ava鏁板瓧瀛楃粍鎴栭摼涔︿袱绉嶇粨鏋勭殑鎿嶄綔鏁堢泭锛屽瓨鍦ㄩ偅绉嶆儏鍐典笅(鐢辨渶鍒濆紑澶达紝鐢辩粨灞�寮�澶达紝鐢变腑闂村紑澶�)锛岄偅绉嶆搷浣�(鎻掑叆锛屾煡鎵撅紝鍏抽棴)鐨勬晥鐩婇珮

涔濄�乯ava涓瓨娉勫厜鐨勯棶绛旈璋冩煡瀹氫綅锛歫鍦板浘锛宩stack鐨勪娇瑕佺瓑绛�

鍗併�佸瓧绗︿覆銆佸瓧绗︿覆builder銆佸瓧绗︿覆buffer涓嶄竴鏍�

鍗佷竴銆乭ashtable鎴杊ash鍦板浘鐨勪笉涓�鏍�

鍗佷簩銆佷笉姝e父鐨勭粨鏋勶紝杩愯涓笉姝e父鎴栦笉杩愯涓笉姝e父锛屽悇涓句竴涓�涓緥瀛�

鍗佷笁銆佸瓧绗︿覆 a= 鈥渁bc鈥� 瀛楃涓� b = "abc" 瀛楃涓� c = new 瀛楃涓�("abc") 瀛楃涓� d = "ab" + "c" .浠栦滑涔嬮棿瑕� == 姣旇緝鐨勭粨鏋�

鍗佸洓銆佸瓧绗︿覆 绫诲瀷鍙峰瀷鍙风殑甯歌鏂规硶

鍗佷簲銆乯ava 鐨勫紩瑕佺被鍨嬪彿鍨嬪彿鍨嬪彿鏈夊摢鍑犵

鍗佸叚銆佹娊璞$被鍨嬪彿鍨嬪彿鎴栨帴鍙g殑涓嶄竴鏍�

鍗佷竷銆乯ava鐨勫叆闂ㄧ被鍨嬪彿鍨嬪彿鍨嬪彿鎴栧瓧鑺傚ぇ灏忋��

鍗佸叓銆丠ashtable,Hash鍦板浘,Co鍗楁槍澶уrrentHash鍦板浘 搴曞眰瀹炵幇鐞嗚涓庣嚎绋嬪钩瀹夐棶绛旈锛堝缓璁啛鎮� jdk 浠g爜锛屾墠鑳界敱瀹瑰洖搴旓級

鍗佷節銆佸儚鏋滀笉璁╂偍瑕乯ava Jdk鎻愪緵鐨勫伐鍏凤紝鎮ㄦ�庢牱鏍峰疄鐜颁竴涓�涓�涓湴鍥撅紝鎮ㄦ�庝笉寮勩�傝浜嗗ソ涔咃紝璁蹭簡Hash鍦板浘浠g爜锛屽儚鏋滄垜寮勶紝灏变細鍊熼壌Hash鍦板浘鐨勭悊璁猴紝璁蹭簡涓�閫欻ash鍦板浘瀹炵幇

浜屽崄銆� Hash鍐茬獊鎬庝笉鍔烇紵閭g鍔炴暎鍒楀啿绐佺殑鏂规硶锛�

浜屽崄涓�銆丠ash鍦板浘鍐茬獊寰堝帀瀹筹紝鏈�宸�т环姣旓紝鎮ㄤ細鎬庝笉鍔�?鐢監锛坣锛夊姞寮鸿嚦log锛坣锛夊挴锛岃浜屽弶鎺掑簭鏈ㄧ殑鎬濊矾璁蹭簡涓�閫�

浜屽崄浜屻�乺ehash

浜屽崄涓夈�乭ashCode() 涓� equals() 鍒涘缓璁℃槸鏂规硶銆佹柟娉曟�庝笉閲嶅啓

2銆乯ava 杈撳叆杈撳嚭

涓�銆佽璁茶緭鍏ヨ緭鍑洪噷闈㈢殑甯歌绫诲瀷鍙峰瀷鍙凤紝瀛楄妭娴併�佸瓧绗︽祦銆佹帴鍙c�佸疄鐜扮被鍨嬪彿鍨嬪彿銆佹柟娉曢樆濉炪��

浜屻�佽璁睳杈撳叆杈撳嚭銆�

涓夈�佸瓧绗︿覆 缂栫爜UTF-鍏� 鎴朑BK鐨勪笉涓�鏍�?

鍥涖�佷粈涓嶄腑鍊欎娇瑕佸瓧鑺傛祦銆佷粈涓嶄腑鍊欎娇瑕佸瓧绗︽祦?

浜斻�侀�掑綊瀛︿範鍙栨枃浠跺す涓嬬殑鏂囦欢锛屼唬鐮佹�庝笉瀹炵幇

3銆乯ava Web

涓�銆乻ess杈撳叆杈撳嚭n鎴朿ookie鐨勪笉涓�鏍锋垨鑱旂郴锛宻ess杈撳叆杈撳嚭n鐨勭敓鍛藉懆鏈燂紝澶氫竴涓�涓湇浜嬮儴缃蹭腑sess杈撳叆杈撳嚭n绠$悊銆�

浜屻�乻ervlet鐨勪竴浜涘叧浜庨棶绛旈

涓夈�亀ebservi鍐呭瓨淇敼鍣ㄥ叧浜庨棶绛旈

鍥涖�乯dbc閾撅紝forname鏂规鐨勬祦绋嬶紝鎬庝笉澹版槑浣胯涓�涓�涓�涓簨浜嬨�備妇渚嬪苟璇︾粏浠g爜

浜斻�佹湭妗嗘灦涓嬮厤缃畐eb.xml鐨勪富瑕侀厤缃腑瀹�

鍏�乯sp鎴杝ervlet鐨勪笉涓�鏍�

4銆丣VM

涓�銆乯ava鐨勪腑瀛樻ā鍨嬪彿浠ヤ笌GC璁℃槸鏂规硶

浜屻�乯vm鎬т环姣旇皟浼橀兘寮勪簡浠�涓�

涓夈�佷粙缁岼VM涓竷涓�涓�涓幓鍩燂紝涔嬪悗灏嗘瘡涓�涓�涓幓鍩熷彲鑳介�犳垚涓瓨鐨勬孩鍑虹殑鎯呭喌璁叉槑

鍥涖�佷粙缁岹C 鎴朑C Root涓嶆甯稿紩瑕併��

浜斻�佹�庢牱鏍风敱classload 鍔犺浇鏂规锛屽姞杞藉埗搴﹁寮�鍘伙紝鐢卞簲鐢ㄧ▼搴忚繍琛屼腑鏁板瓧瀛楁嵁鍘伙紝璁茶嚦涓瓨鍒嗛厤锛岃鑷冲瓧绗︿覆甯搁噺姹狅紝璁茶嚦JVM鍨冨溇鍥炴敹鍒跺害锛岃鏄柟娉曪紝hotspot銆傚弽姝h繕鏄悇绉嶅欢闀�

鍏�乯vm 鍍忎綍鍒嗛厤鐩存帴涓瓨锛� new 鐩爣鍍忎綍涓嶅垎閰嶅瓨鍦ㄥ爢鑰岃繕鏄爤涓婏紝甯搁噺姹犲垎鏋�

涓冦�佹暟瀛楀瓧缁勫澶ф斁瀛樺湪 JVM 鑰佸勾浠o紙涓嶅彧杩樻槸璁剧疆 PretenureSizeThreshold 锛岄棶閫氬父澶氬ぇ锛屾病鏈夊紕杩囦竴闂究鐭ワ級

鍏�佽�佸勾浠d腑鏁板瓧瀛楃粍鐨勮闂柟妗�

涔濄�丟C 璁℃槸鏂规硶锛屾案鎭掍唬鐩爣鍍忎綍 GC 锛� GC 鏈夌幆鎬庝笉鍔�

鍗併�佽皝浼氫负 GC 锛屼粈涓嶄腑鍊� GC

鍗佷竴銆佸儚鏋滈渶瑕佷笉涓� GC 鎬庝笉鍔�

鍗佷簩銆佸儚鏋滈渶瑕佸瓨鍦� GC 涓敓瀛� 涓� 娆℃�庝笉鍔�

5銆佸紑婧愭鏋�

涓�銆乭ibernate鎴杋batis鐨勪笉涓�鏍�

浜屻�佽璁瞞ybatis鐨勯摼姹犮��

涓夈�乻pring妗嗘灦涓渶瑕佸紩瑕侀偅绉峧ar鍖咃紝浠ヤ笌杩欎簺jar鍖呯殑瑕侀��

鍥�. springMVC鐨勭悊璁�

浜斻�乻pringMVC娉ㄨВ鐨勬剰鎬�

鍏�乻pring涓璪eanFactory鎴朅pplicat杈撳叆杈撳嚭nContext鐨勮仈绯绘垨涓嶄竴鏍�

涓冦�乻pring娉ㄥ叆鐨勫嚑绉嶆柟妗堬紙寰幆娉ㄥ叆锛�

鍏�乻pring鍍忎綍瀹炵幇浜嬬墿绠$悊鐨�

涔濄�乻pring杈撳叆杈撳嚭C

鍗併�乻pring AOP鐨勭悊璁�

鍗佷竴銆乭ibernate涓殑涓�绾ф垨浜岀骇缂撳瓨鐨勪娇瑕佹柟妗堜互涓庝笉涓�鏍风悊璁猴紙Lazy-Load鐨勭悊瑙o級

鍗佷簩銆丠ibernate鐨勭悊璁轰綋绯绘灦鏋勶紝浜斿ぇ鏍稿績鎺ュ彛锛孒ibernate鐩爣鐨�3绉嶇姸鎬佸彉鎴愶紝浜嬩簨绠$悊銆�

6銆佸绾跨▼

涓�銆乯ava鍒涘缓寤虹嚎绋嬩互鍚庯紝鐩存帴璋冭start()鏂规硶鎴杛un()鐨勪笉涓�鏍�

浜屻�佸父瑕佺殑绾跨▼姹犳ā寮忎互涓庝笉涓�鏍风嚎绋嬫睜鐨勪娇瑕佸満鏅�

涓夈�乶ewFixedThreadPool姝ょ绾跨▼姹犲儚鏋滅嚎绋嬫暟瀛楀瓧杈捐嚦鏈�澶у�煎悗浼氭�庝笉鍔烇紝搴曞眰鐞嗚銆�

鍥涖�佸绾跨▼涔嬮棿閫氫俊鐨勫悓姝ラ棶绛旈锛宻ynchronized閿佸畾鐨勮繕鏄洰鏍囷紝琛嶄几鎴杝ynchronized鍏充簬澶氱殑璇︾粏闂瓟棰橈紝渚嬪儚鍚屼竴涓�涓�涓被鍨嬪彿鍨嬪彿涓嶄竴鏍锋柟娉曞寘鎷瑂ynchronized閿佸畾锛屼竴涓�涓�涓洰鏍囪繕鏄惁鍙互鍚屼腑璁块棶銆傛垨鑰呬竴涓�涓�涓被鍨嬪彿鍨嬪彿鐨剆tatic鏋勯�犳柟娉曞姞涓妔ynchronized浠ュ悗鐨勯攣瀹氱殑褰卞搷銆�

浜斻�佷簡瑙e彲閲嶅叆閿佸畾鐨勫惈涔夛紝浠ヤ笌Reentrant閿� 鎴杝ynchronized鐨勪笉涓�鏍�

鍏�佸悓姝ョ殑鏁板瓧瀛楁嵁缁撴瀯锛屼緥鍍廲o鍗楁槍澶уrrentHash鍦板浘鐨勪唬鐮佺悊瑙d互涓庝腑閮ㄥ疄鐜扮悊璁猴紝涓轰粈涓嶄粬杩樻槸鍚屾鐨勪笖鏁堢泭楂�

涓冦�乤tomicinteger鎴杤olatile绛夌嚎绋嬪钩瀹夋搷浣滅殑鍏抽敭瀛楃殑鐞嗚В鎴栦娇瑕�

鍏�佺嚎绋嬮棿閫氫俊锛寃ait鎴杗otify

涔濄�佸畾涓嚎绋嬬殑浣胯

鍗併�佸満鏅細瀛樺湪涓�涓�涓�涓富绾跨▼涓紝瑕佹眰鏈夊ぇ閲�(澶氬)瀛愮嚎绋嬭繍琛屽畬鎴愪互鍚庯紝涓荤嚎绋嬫墠杩愯瀹屾垚鎴愩�傚绉嶆柟妗堬紝鑰冭檻鏁堢泭銆�

鍗佷竴銆佽繘绋嬫垨绾跨▼鐨勪笉涓�鏍�

鍗佷簩銆佷粈涓嶅彨绾跨▼骞冲畨锛熶妇渚嬭鏄�

鍗佷笁銆佺嚎绋嬬殑鍑犵鐘舵��

鍗佸洓銆佸苟鍙戙�佸悓姝ョ殑鎺ュ彛鎴栨柟娉�

鍗佷簲銆丠ash鍦板浘 杩樻槸鍚︾嚎绋嬪钩瀹夛紝涓哄暐涓嶅钩瀹夈�� Co鍗楁槍澶уrrentHash鍦板浘锛岀嚎绋嬪钩瀹夛紝涓哄暐骞冲畨銆傚簳灞傚疄鐜拌繕鏄�庝笉鏍风殑銆�

鍗佸叚銆丣.U.C涓嬬殑甯歌绫诲瀷鍙峰瀷鍙风殑浣胯銆� ThreadPool鐨勬繁鍏ヨ闂紱 B閿乮ngQueue鐨勪娇瑕併�傦紙take锛宲oll鐨勪笉涓�鏍凤紝put锛宱ffer鐨勪笉涓�鏍凤級锛涚瀛愮被鍨嬪彿鍨嬪彿鐨勫疄鐜般��

鍗佷竷銆佺畝鍗曚粙缁嶄笅澶氱嚎绋嬬殑鎯呭喌锛岀敱鍒涘缓涓�涓�涓�涓嚎绋嬪紑澶淬�備箣鍚庢�庝笉鎺у埗鍚屾绋嬪簭锛屽绾跨▼甯歌鐨勬柟娉曟垨缁撴瀯

鍗佸叓銆乿olatile鐨勭悊瑙�

鍗佷節銆佸疄鐜板绾跨▼鏈夊嚑绉嶆柟妗堬紝澶氱嚎绋嬪悓姝ユ�庝笉寮勶紝璁茶鍑犱竴涓�涓嚎绋嬮噷甯歌鐨勬柟娉�

7銆佺綉缁滈�氫俊

涓�銆乭ttp杩樻槸鏈姸鎬侀�氫俊锛宧ttp鐨勭敵璇锋柟妗堟湁閭g锛屽彲浠ユ�庢牱鏍峰畾涔夋柊鐨勭敵璇锋柟妗堜笉銆�

浜屻�乻ocket閫氫俊锛屼互涓庨暱閾撅紝鍒嗗寘锛岄摼涓嶆甯告柇寮�鐨勫姙銆�

涓夈�乻ocket閫氫俊妯″瀷鍙风殑浣胯锛屼竴浣撴満鎴朜杈撳叆杈撳嚭銆�

鍥涖�乻ocket妗嗘灦netty鐨勪娇瑕侊紝浠ヤ笌N杈撳叆杈撳嚭鐨勫疄鐜扮悊璁猴紝涓轰粈涓嶈繕鏄紓姝ヤ笉闃诲銆�

浜斻�佸悓姝ユ垨寮傛锛岄樆濉炴垨涓嶉樆濉炪��

鍏�丱SI涓冨眰妯″瀷鍙凤紝鍖呮嫭TCP,IP鐨勪竴浜涘熀鏈煡璇�

涓冦�乭ttp涓紝get post鐨勪笉涓�鏍�

鍏�佽璁瞙ttp,tcp,udp涔嬮棿鍏崇郴鎴栦笉涓�鏍枫��

涔濄�佽璁叉祻瑙堝櫒璁块棶www.taobao.com锛岀粡鍘嗕簡鎬庢牱鏍风殑绋嬪簭銆�

鍗併�丠TTP鍗忚銆� HTTPS鍗忚锛孲SL鍗忚涓庡畬鎴愭暣浜や簰绋嬪簭锛�

鍗佷竴銆乼cp鐨勬嫢濉烇紝蹇洖浼狅紝ip鐨勬姤鏂囦涪寮�

鍗佷簩銆乭ttps鍔炵殑涓�涓�涓�涓▼搴忥紝瀵圭О鍔犲瘑鎴栦笉瀵圭О鍔犲瘑

鍗佷笁銆乭ead鍚勪竴涓�涓壒寰佹垨涓嶄竴鏍�

鍗佸洓銆佽璁叉祻瑙堝櫒璁块棶www.taobao.com锛岀粡鍘嗕簡鎬庢牱鏍风殑绋嬪簭銆�

8銆佹暟瀛楀瓧鎹ぇ鍏∕ySql

涓�銆丮ySql鐨勫瓨鍌ㄥ紩鎿庣殑涓嶄竴鏍�

浜屻�佸崟涓�涓�涓储寮曘�佽仈鍚堢储寮曘�佷富閿储寮�

涓夈�丮ysql鎬庝笉鍒嗕功锛屼互涓庡垎涔﹀悗鍍忔灉闇�瑕佹寜鏉′欢鍒嗛〉鏌ヨ鎬庝笉鍔�(鍍忔灉涓嶈繕鏄寜鍒嗕功瀛楁鏉ユ煡璇㈢殑璇濓紝鍑犱箮鏁堢泭浣庝笅锛屾湭瑙�)

鍥涖�佸垎涔︿互鍚庨渶瑕佽涓�涓�涓�涓猧d澶氫竴涓�涓功杩樻槸鑷鐨勶紝鏁堢泭瀹炵幇

浜斻�丮ySql鐨勪富鐢卞疄涓浠藉悓姝ョ殑閰嶇疆锛屼互涓庣悊璁�(鐢卞ぇ鍏ㄥ涔犱富澶у叏鐨刡inlog)锛屽涔犲啓鍒嗙

鍏�佸啓SQL璇彞銆傘�傘��

涓冦�佺储寮曠殑鏁板瓧瀛楁嵁缁撴瀯锛孊+鏈�

鍏�佷簨浜嬬殑鍥涗竴涓�涓壒鎬э紝浠ヤ笌鍚勮嚜鐨勭壒寰侊紙绂诲瓙銆侀殧鏂級绛夌瓑锛岄」鎬庝笉鍔炶繖浜涢棶绛旈

涔濄�佹暟瀛楀瓧鎹ぇ鍏ㄧ殑閿佸畾锛氳閿佸畾锛屼功閿佸畾锛涙偛瑙傞攣瀹氾紝鎮茶閿佸畾

鍗併�佹暟瀛楀瓧鎹ぇ鍏ㄤ簨浜嬬殑鍑犵绮掑害锛�

鍗佷竴銆佸叧绯诲瀷鍙锋垨涓嶅叧绯诲瀷鍙锋暟瀛楀瓧鎹ぇ鍏ㄤ笉涓�鏍�

9銆佽璁℃ā寮�

涓�銆佸崟渚嬫ā寮忥細楗辨眽銆侀タ姹夈�備互涓庨タ姹変腑鐨勫欢杩熷姞杞�,鍙岄噸妫�鏌�

浜屻�佸伐鍘傛ā寮忋�佽楗拌�呮ā寮忋�佽瀵熻�呮ā寮忋��

涓夈�佸伐鍘傛柟娉曟ā寮忕殑浼樼偣锛堜綆鑰﹀悎銆侀珮涓仛锛屽紑鏀惧皝闂師鍒欙級

10銆佽鏄柟娉�

涓�銆佷娇瑕侀殢鏈鸿鏄柟娉曚骇鐢熶竴涓�涓�涓暟瀛楀瓧锛岃姹傚皢涓�-涓�000W涔嬮棿杩欎簺鏁板瓧瀛楀叏閮ㄥ垱寤恒�傦紙璁块棶楂樻晥鐩婏紝鍔炰骇鐢熷啿绐佺殑闂瓟棰橈級

浜屻�佷竴涓�涓�涓暟瀛楀瓧缁勭殑鍊掑簭

涓夈�佽鏄竴涓�涓�涓鏁存暟瀛楀瓧鐨勬骞虫柟鏍�

鍥涖�佽鐧戒簡杩樻槸甯歌鐨勯偅浜涙煡鎵俱�佹帓搴忚鏄柟娉曚互涓庡悇鑷殑涓棿澶嶆潅搴�

浜斻�佷簩鍙夋湪鐨勯亶鍘嗚鏄柟娉�

鍏�丏FS,BFS璁℃槸鏂规硶

涓冦�佹瘮杈冮噸瑕佺殑鏁板瓧瀛楁嵁缁撴瀯锛屽儚閾句功锛岄槦鍒楋紝鏍堢殑鍩烘湰鐞嗚В涓庡ぇ鑷村疄鐜般��

鍏�佹帓搴忚鏄柟娉曚笌涓┖澶嶆潅搴︼紙蹇帓涓轰粈涓嶄笉绋冲畾锛屼负浠�涓嶆偍鐨勯」杩樺瓨鍦ㄨ锛�

涔濄�侀�嗘尝鍏拌鏄櫒

鍗併�丠offman 缂栫爜

鍗佷竴銆佹煡鎵炬湪涓庣孩榛戞湪

瀛︿範Java鐨勫悓瀛︽敞鎰忎簡锛侊紒锛�
瀛︿範杩囩▼涓亣鍒颁粈涔堥棶棰樻垨鑰呮兂鑾峰彇瀛︿範璧勬簮鐨勮瘽锛屾杩庡姞鍏ava瀛︿範浜ゆ祦缇�346942462锛屾垜浠竴璧峰Java锛�

你可能感兴趣的:(2017骞磈ava寮�鍙戣亴浣嶉潰璇曢鍗佸垎绫绘眹鎬� java闈㈣瘯绂忓埄)