锘??xml version="1.0" encoding="utf-8" standalone="yes"?> Master Java 5.0 and TDD Together: Build More Robust, Professional Software Master Java 5.0, object-oriented design, and Test-Driven Development (TDD) by learning them together. Agile Java weaves all three into a single coherent approach to building professional, robust software systems. Jeff Langr shows exactly how Java and TDD integrate throughout the entire development lifecycle, helping you leverage today's fastest, most efficient development techniques from the very outset. Langr writes for every programmer, even those with little or no experience with Java, object-oriented development, or agile methods. He shows how to translate oral requirements into practical tests, and then how to use those tests to create reliable, high-performance Java code that solves real problems. Agile Java doesn't just teach the core features of the Java language: it presents coded test examples for each of them. This TDD-centered approach doesn't just lead to better code: it provides powerful feedback that will help you learn Java far more rapidly. The use of TDD as a learning mechanism is a landmark departure from conventional teaching techniques. Presents an expert overview of TDD and agile programming techniques from the Java developer's perspective Brings together practical best practices for Java, TDD, and OO design Walks through setting up Java 5.0 and writing your first program Covers all the basics, including strings, packages, and more Simplifies object-oriented concepts, including classes, interfaces, polymorphism, and inheritance Contains detailed chapters on exceptions and logging, math, I/O, reflection, multithreading, and Swing Offers seamlessly-integrated explanations of Java 5.0's key innovations, from generics to annotations Shows how TDD impacts system design, and vice versa Complements any agile or traditional methodology, including Extreme Programming (XP)
E鏂囦笉綆楀お闅撅紝涓鑸兘搴旇鍙互鐪嬫噦錛屼負(fù)浠涔堝ソ涔﹂兘鏄佸鍐欑殑鍛紵
鎴戞兂鎶婁功浼犱笂鏉ワ紝浣嗘槸.Text瀵規(guī)枃浠剁殑澶у皬濂借薄鏄湁闄愬埗錛屼功鐨勫悕瀛楀彨
Agile Java Crafting Code with Test-Driven Development錛屾兂瑕佺殑鍚屽鍙互鐣欎笅EMAIL
]]>
]]>
涓銆?/span> 鐢ㄦ瀯閫犲嚱鏁板垵濮嬪寲
1錛?銆?span style="FONT: 7pt 'Times New Roman'">聽聽 鍑芥暟鐨勭鍚嶅拰榪斿洖鍊?/span>
鏋勯犲嚱鏁板彲浠ラ氳繃涓嶅悓鐨勫嚱鏁扮鍚嶆潵榪涜閲嶈澆銆傛瀯閫犲嚱鏁版病鏈夎繑鍥炲鹼紝榪欏拰榪斿洖鍊間負(fù) void 鐨勬槸涓嶅悓鐨?/span>
1錛?銆?span style="FONT: 7pt 'Times New Roman'">聽聽 鏋勯犲嚱鏁扮殑閲嶈澆
濡備綍鍖哄垎鏋勯犲嚱鏁扮殑涓嶅悓鍛紝鐢ㄤ笉鍚岀殑鍑芥暟絳懼悕銆傚嚱鏁扮鍚嶇殑欏哄簭涓嶅悓閮藉彲浠ワ紝浣嗘槸榪欐牱鐨勭紪紼嬮鏍兼槸涓嶅ソ鐨勩?/span>
鍑芥暟鐨勭鍚嶄細(xì)涓婂崌杞瀷錛堝綋娌℃湁鍚堥傜殑鍑芥暟絳懼悕鍑虹幇鐨勬椂鍊欙級錛屼絾鏄笉浼?xì)绐勫寲铦{鍨嬶紝浣犲繀欏昏鏄劇ず鐨勮繘琛屽己鍒剁被鍨嬭漿鎹€?/span>
涓嶈兘浠?/span> return value 鐨勪笉鍚屼綔涓洪噸杞界殑鏍囧噯銆?/span>
褰撶▼搴忔彁渚涗簡鏋勯犲嚱鏁頒互鍚庯紝緋葷粺灝變笉鍦ㄦ彁渚涢粯璁ょ殑鏋勯犲嚱鏁頒簡銆?/span>
This 鍏抽敭瀛楁寚鐨勬槸褰撳墠瀵硅薄錛屾湁浜?/span> this 鍚庯紝鍙互鍦ㄦ瀯閫犲嚱鏁頒腑浠ュ涓嬬殑鏂瑰紡璋冪敤
1錛?銆?span style="FONT: 7pt 'Times New Roman'">聽聽 Static 鐨勫惈涔?/span>
浣犳棤娉曞湪 static 鍑芥暟涓皟鐢?/span> non-static 鍑芥暟錛屼絾鏄綘鍙互鍦?/span> non-static 涓皟鐢?/span> static 鍑芥暟銆?/span>
浜屻?/span> 綾葷殑娓呯悊
JAVA 鐨勫瀮鍦懼洖鏀舵満鍒跺彧鑳藉洖鏀?/span> new 鍑烘潵鐨勫璞★紝浣嗘槸浣犵殑瀵硅薄涓嶆槸 new 鍑烘潵鐨勮岃幏寰楃殑鈥滅壒孌娾濆唴瀛橈紝閭d箞 JAVA 鐨勫瀮鍦懼洖鏀跺氨涓嶈兘澶勭悊錛岃繖鏍峰氨蹇呴』鐢?/span> finalize() 鍑芥暟鏉ラ噴鏀句綘鐨勨滅壒孌娾濆唴瀛樸?/span>
JAVA 鐨勬竻鐞嗘柟寮忔槸鍏堣皟鐢ㄤ綘鐨?/span> finalize() 錛岀劧鍚庡湪涓嬫鍨冨溇鍥炴敹鐨勬椂鍊欐潵娓呯悊浣犵殑鈥滅壒孌娾濆唴瀛樸?/span>
鍏抽敭鐨勪笁鍙ヨ瘽錛?/span>
鍨冨溇鍥炴敹涓嶇瓑浜庢瀽鏋勶紱
浣犵殑瀵硅薄鍙兘涓嶈鍥炴敹錛?/span>
鍨冨溇鍥炴敹鍔ㄤ綔鍙洖鏀跺唴瀛樸?/span>
鐢?/span> System.gc() 鍙互鐢ㄦ潵寮鴻揩緇堢粨鍔ㄤ綔鐨勫彂鐢?/span>