This book is a collection of practical suggestions, advice, examples and discussions about Java programming. The organisation is inspired by that of Scott Meyer's Effective C++ ; it consists of 68 mini-essays, grouped into the following sections:
- Objects and equality
- Exception handling
- Performance
- Multi-threading
- Classes and interfaces
- Miscellaneous topics
The discussions are generally easy to follow, but I sometimes feel that the author misses the wood for the trees. For example, he spends 35 pages discussing pitfalls that can occur when overriding the
equals()method, but never quite manages to explain why you would need to do so. He produces a rather contrived example of comparing golf balls, but never explains why the comparison must be done by overriding
equals()rather than by a user method such as
sameBrandAndMake(). He also fails to point out that if you override
equals()you will probably also need to override
hashCode().
If you are a beginner who has mastered the basic syntax, then you need to understand most of the material in this book before you can consider yourself a competent Java programmer. However I am reluctant to give the book an unconditional recommendation, since much of the material can also be found in the better introductory Java books and so you may find this one redundant. Perhaps the best solution would be to borrow a copy, or at least to read through the detailed table of contents in the bookshop. If you find that you already understand most of the material,you can spend your money on something more advanced instead.