This comprehensive guide shows you how to master the most important changes to Java since it was first released. Generics and the greatly expanded collection libraries have tremendously increased the power of Java 5 and Java 6. But they have also confused many developers who haven't known how to take advantage of these new features.
"Java Generics and Collections" covers everything from the most basic uses of generics to the strangest corner cases. It teaches you everything you need to know about the collections libraries, so you'll always know which collection is appropriate for any given task, and how to use it.
Topics covered include: Fundamentals of generics: type parameters and generic methods Other new features: boxing and unboxing, foreach loops, varargs Subtyping and wildcards Evolution not revolution: generic libraries with legacy clients and generic clients with legacy libraries Generics and reflection Design patterns for generics Sets, Queues, Lists, Maps, and their implementations Concurrent programming and thread safety with collections Performance implications of different collections
Generics and the new collection libraries they inspired take Java to a new level. If you want to take your software development practice to a new level, this book is essential reading.
Philip Wadler is Professor of Theoretical Computer Science at the University of Edinburgh, where his research focuses on the design of programming languages. He is a co-designer of GJ, work that became the basis for generics in Sun's Java 5.0.
Maurice Naftalin is Technical Director at Morningside Light Ltd., a software consultancy in the United Kingdom. He has most recently served as anarchitect and mentor at NSB Retail Systems plc, and as the leader of the client development team of a major UK government social service system.
""A brilliant exposition of generics. By far the best book on the topic, it provides a crystal clear tutorial that starts with the basics and ends leaving the reader with a deep understanding of both the use and design of generics."" Gilad Bracha, Java Generics Lead, Sun Microsystems
Customer Reviews:
Avg. Customer Rating: 4.5 / 5.0
Explains the inexplicable:
There are some difficult issues with Java Generics. This book does an excellent job explaining them. It also provides a good guide when to use generics, its limitations, and the new limitations that it introduces for arrays.
Very Thorough, Maybe Too Much So:
This book has very in-depth information on Java generics, but some of the details are just not that interesting to the practical developer. It helps you gain a deeper understanding, but you probably want to first know what generics are, how to use them, when to use them, and best practices for using them before you get into the nitty-gritty of how the compiler represents them in byte code and what "reification" means. I also found it strange that symbols like T and E that are not familiar to pre Java... more info
Excellent Book I wish i had it 10 yrs ago.:
This is excellent book, i really wish i had this book 10 yrs ago, excellent verbiage and great concepts.
Excellent coverage of generics:
The authors provide detailed examples of capabilities provided by Generics. There are plenty of examples to illustrate various concepts. And many more examples which put them all together to show how they can be used to write full fledged OOPrograms. Its admirable how a non-trivial topic like Generics has been explained in a simple and succinct style. The collections coverage is good, but not as great as the Generics coverage.