16 Generic Collections
Objectives
In this chapter you’ll:
Learn what collections are.
Use class
Arrays
for array manipulations.Learn the type-wrapper classes that enable programs to process primitive data values as objects.
Understand the boxing and unboxing that occurs automatically between objects of the type-wrapper classes and their corresponding primitive types.
Use prebuilt generic data structures from the collections framework.
Use various algorithms of the
Collections
class to process collections.Use iterators to “walk through” a collection.
Learn about synchronization and modifiability wrappers.
Learn about Java SE 9’s new factory methods for creating small immutable
List
s,Set
s andMap
s.
Get Java How To Program, Late Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.