Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Java Generics and Collections Paperback – October 24, 2006
|New from||Used from|
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently Bought Together
Customers Who Bought This Item Also Bought
Top Customer Reviews
Part I of this book provides a thorough introduction to generics. Generics are a powerful, and sometimes controversial, new feature of the Java programming language. This part of the book describes generics, using the Collections Framework as a source of examples.
The first five chapters focus on the fundamentals of generics. Chapter 1 gives an overview of generics and other new features in Java 5, including boxing, foreach loops, and functions with a variable number of arguments. Chapter 2 reviews how subtyping works and explains how wildcards let you use subtyping in connection with generics. Chapter 3 describes how generics work with the Comparable interface, which requires a notion of bounds on type variables. Chapter 4 looks at how generics work with various declarations, including constructors, static members, and nested classes. Chapter 5 explains how to evolve legacy code to exploit generics, and how ease of evolution is a key advantage of the design of generics in Java. Once you have these five chapters under your belt, you will be able to use generics effectively in most basic situations.
The next four chapters treat advanced topics.Read more ›
This book is good in that it does cover many of the issues, and some interesting applications, but is I think limited in both explanations, and examples. Their section on Generics and Design patterns is a welcome one, but very short, and not very long on rationale or depth on other applications. If the examples they show is the only impact of generics on design patterns, something is wrong!
The standard Generics tutorials by Bracha and Langer, and the IBM DeveloperWorks series by Allen are more complete, and more descriptive, and free! I found the lumping of collections together with Generics ok, but a bit indicative that they ran out of real generics material. They are also IMHO a bit defensive on the long contested Erasure approach, but do explain their viewpoint well. They fault the C# and C++ approaches too quickly, noting the problems but not the corresponding solutions provided. Hopefully next versions of Java will (soon) provide reified versions of generics, it looks like it is in process now.
I did think it a worthwhile read, but not as much as expected.
It's comprehensive, sure... but the examples lean to near overkill on each topic in some areas. In other areas, there just isn't enough information or example code to really drive home the ideas.
It's average and worth the read. Not worth keeping around, though. It's one of those "read-once-then-give-it-to-a-friend" books. Like I said, though: you should definitely read this book if you're looking for more information on these topics. You'll just find yourself hitting resources online for more information in areas you are particularly interested in (concurrency w/ collections, for example).
Part 1 - Generics: Introduction; Subtyping and Wildcards; Comparison and Bounds; Declarations; Evolution, Not Revolution; Reification; Reflection; Effective Generics; Design Patterns
Part 2 - Collections: The Main Interfaces of the Java Collections Framework; Preliminaries; The Collection Interface; Sets; Queues; Lists; Maps; The Collections Class; Index
There have been quite a few books out that deal with the new Java 5.0 features, of which generics and collections are the featured items. But few go past the basics and common usage. Naftalin and Wadler devote this entire book to just those new features, which means they can spend a lot more time diving into the guts of how they work. There are nice "before generics" and "after generics" comparisons in the one section, so you can see how current coding styles can be enhanced and modified. I also liked how some basic design patterns were used to show how generics can be incorporated into standard designs. The collections material is just as helpful. Each type of collection is covered in detail, both for the reference on how it's coded as well as diagrams to show the architecture of that type of list. Again, when you get done with the section, there shouldn't be too many questions and issues surrounding collections that you can't answer or at least figure out.
Solid material, and definitely a title you'll want to have around when you start playing around with generics and collections...
Most Recent Customer Reviews
Book is good in the sense that it is the only known book which is entirely dedicated to the subject. Read morePublished 3 months ago by Zenifer Cheruveettil
Although the front cover seems to suggest that Collections are given less attentions than Generics, that is not the case: the book is split in two roughly equal parts. Read morePublished 13 months ago by Paolo Baronti
This is one of the first books on the Java Generics and Collections libraries. The book in question is - Java Generics and Collections, by Maurice Naftalin and Philip Wadler from... Read morePublished on May 30, 2013 by Munish K Gupta
Coming to JAVA from C++, I was thinking, hey, I need to read up on JAVA Generics, they are like C++ Templates and will help me program better. Read morePublished on April 29, 2013 by G. Powell
If you'r starting in Java, I recommend you to read first the information about Generics on Oracle documentation on their web page thoroughly and get familiar with it. Read morePublished on April 5, 2013 by PetRaf
I have mastered generics because of this book. Thanks! Be prepared to read some of the passages a couple of times. Read morePublished on March 24, 2013 by Axl Mattheus
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! Read morePublished on May 15, 2011 by Jeanne Boyarsky
This is a very basic introduction to the Java Collections Framework and simple use of generics. Emphasis on *simple*. Read morePublished on November 29, 2009 by Paul J. Ste Marie
This book is very useful.
It is in fact, ridiculously concise. It may seem like a flimsy little workbook, but somehow a ton of information is fit in it. Read more