Description:
Now that Java is being used for real-world projects, the experts are figuring out what works and what doesn't when it comes to coding style. Peter Haggar's Practical Java: Programming Language Guide compiles a remarkably useful set of over 60 coding tips that will make your programs more maintainable and perform better. Chances are that this title has something to offer every programmer who works with Java. This book is organized simply and effectively with 68 practical tips (or in the author's terms "praxes") for writing better Java code. Tips are grouped into sections, such as general tips, objects and equality, exception handling, and performance and multithreading. The book illustrates each tip with short code excerpts demonstrating effective coding strategies (plus several common Java pitfalls). The book contains numerous standout sections, including the proper way to write equals methods for custom classes, tips for writing more efficient classes, and numerous do-it-yourself techniques for optimizing code. (As the author suggests, not all of today's Java compilers will do this optimization for you.) The book contains several sections that should be read by every Java developer, and though some tips are more obscure, there's certainly something to benefit every reader. While C++ programmers have had books on coding style for years, Java is only now coming into its own with titles like this one. With its concise format, no-nonsense prose style, and expert-eye perspective on Java, Practical Java: Programming Language Guide shows the same maturing refinement as the language it lucidly describes. --Richard Dragan Topics covered: Java programming tips, understanding references, final and static keywords, using instanceof, tips for garbage collection, custom equals methods, exception handling tips, using finally blocks, using exceptions with constructors, performance tips, compile-time vs. run-time code optimization, using StringBuffer, minimizing object creation, arrays, Java native code, multithreading tips, the synchronized keyword, spin locks, Java interfaces for emulating multiple inheritance, the abstract keyword, the clone method and immutable objects, tips for finalize methods.
|