java.util

Back Up Next

 

java.util
Old time favorites
StringTokenizer, Date, Random
Collections API
A collections framework is a unified architecture for representing and manipulating collections
It consists of Interfaces, Implementations, and Algorithms
Interfaces

Implementations
  Implementations
Hash Table Resizable Array Balanced Tree Linked List
Interfaces Set HashSet   TreeSet  
List   ArrayList   LinkedList
Map HashMap   TreeMap  
Algorithms

java.util.Collections class

Collections - lots of concrete implementations of common algorithms and general utilities
binary search, reverse order, randomize, sort
synchronize Collection data types
make read-only Collection data types
Enumeration and Iterators
Iterator replaces Enumeration in the Collections API
Iterator allows the caller to remove elements from the underlying collection with well-defined semantics
Method names are shorter and more intuitive
Iterator - hasNext, next, remove
Enumeration - hasMoreElements, nextElement