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