This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Author/s : Maurice Naftalin, Philip Wadler
Publisher : O'Reilly Media
Category : Advanced Java Review by : Jeanne Boyarsky
Rating : 6 horseshoes
My first thought on seeing the title "Java Generics and Collections" was wondering how there could be a whole book's worth of material on the topic. There is!
The first half of the book addresses generics. It includes concepts like reification (I learned a new word) that helps you better understand how generics actually work. It also includes a number of idioms for dealing with generics that you might not know even if you use generics.
The rest of the book covers the Collection API including how each one works and when to each type. This felt somewhat drawn out and repetitive. I would have liked to see the new classes in Java 5 and 6 highlighted more.
The downside: Some of the code examples were on the long side and some of the text required a lot of concentration. I also noticed a typo in the name of a Java class in a diagram which feels worse than in text. I also feel too broad an audience is covered. Parts assume you know nothing (in which case you'd be in over your head.)
Overall I recommend the book to learn about generics on a level of detail that surpasses the tutorials.