CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ | Grades

Collections

Collections and Generics
Java collections
Java Collection Framework

The Java Collection Framework and classes

  • The Java Collection Framework (JCF) is interface based. That means that each class in the collection implements one of the interfaces defined by the collection framework.
  • The collection framework consists of two class hierarchies: Collection and Map.
  • Collections store individual objects as elements. Maps store pairs of key objects and value objects in a way that lets you retrieve a value object based on its key.
  • Although there are many classes in the Java collection framework, the most commonly used classes are the ArrayList, LinkedList, HashSet, HashMap, and TreeMap classes.

Previous | Comparison of arrays and collections | Java collection framework | Collection classes | Generics | Homogeneous list | Next