Chapter 16. Collections

  • Collection API

  • List, LinkedList, and ArrayList

  • Set, HashSet, and SortedSet

  • The Collections Helper Class

  • Wildcard Parameters and Generic Methods

  • Wildcarding a Generic Parameter

  • Generic Methods

  • Summary of Collection

  • Map, HashMap, and TreeMap

  • Exercises

  • Some Light Relief—Early Names for Java

We come now to a most important part of Java: the java.util and related packages that provide off-the-shelf data structures for your programs.

Computer science has a couple of dozen standard data structures (such as the linked list, the binary tree, the stack, etc). Java provides many of these standard data structures directly as library classes, and makes it easy for you to implement additional ones in a consistent ...

Get Just Java™ 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.