Categorized | Java Books

Java Generics and Collections

Posted on 26 August 2008

Java Generics and Collections




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

User Ratings and Reviews

5 Stars 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.

5 Stars Java Generics and Collections and Bears, Oh My!
Generics in Java have some non-trivial aspects, and this book does a great job of explaining when you need to use what in a comprehensive and concise manner. I thought I knew Generics, now I know I didn’t… If List looks strange to you, then this book is for you.

Not sure why half of the book is devoted to Collections (rather than having that be a separate book), but in any case these chapters are also very well written. There are simple explanations how to choose the most suitable Collection classes for any given situation.

The Collections discussion touches the issue of multi-threaded programming. I almost expect the next edition to be titled “Java Generics and Collections and Concurrency”…

5 Stars 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.

3 Stars Average, Nothing Exciting… not much more than its online alternative…
It’s a decent reference and a great read to go over generics and the collections framework. But don’t get me wrong, it’s nothing you can’t get from just reading the Sun-provided API documentation or tutorials covering the topics.

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).

5 Stars Excellent Book on Generics and Collections
This a very good book on Collections and Generics. It is very readable and very well laid out and organized. Besides treating Generics thoroughly it also treats threadsafe collections very well too.

For these reasons I highly recommend this book.

Buy/More Info

This post was written by:

Admin - who has written 60 posts on java-ebooks.com.


Contact the author

Leave a Reply