Book description
Java Generics and Collections has been the go-to guide to generics for more than a decade. This second edition covers Java 21, providing a clear guide to generics from their most common uses to the strangest corner cases, giving you everything you need to know to use and write generic APIs effectively. It covers the collections library thoroughly, so you'll always know how and when to use each collection for any given task. And it explains stream processing, so you'll know which model to use and how they interoperate to get the best out of the platform library.
This indispensable guide covers:
- Fundamentals of generics: type parameters and generic methods
- Subtyping and wildcards
- Generics and reflection
- Design patterns for generics
- Sets, queues, lists, maps, and their implementations
- Concurrent programming and thread safety with collections
- Performance of different collection implementations
- Best practices for using and extending the Java collections framework
- Design philosophy and comparison with other collections libraries
Publisher resources
Table of contents
- 1. Subtyping and Wildcards
- 2. Comparison and Bounds
- 3. Declarations
- 4. The Main Interfaces of the Java Collections Framework
- 5. Preliminaries
- 6. The Collection Interface
- 7. The SequencedCollection Interface
- 8. Sets
- 9. Queues
- 10. Lists
- 11. Maps
- 12. The Collections Class
- 13. Guidance for Using the Java Collections Framework
Product information
- Title: Java Generics and Collections, Second Edition
- Author(s):
- Release date: June 2025
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098136727
You might also like
book
Java Generics and Collections
This comprehensive guide shows you how to master the most importantchanges to Java since it was …
video
Understanding Java 8 Generics
Java 5 introduced generics capabilities to the language, and for most developers, simply knowing that collections …
book
Java Coding Problems - Second Edition
Stay on top of the new Java features (up to JDK 21) and find efficient solutions …
book
Functional Programming in Java, 2nd Edition
Imagine writing Java code that reads like the problem statement, code that's highly expressive, concise, easy …