
It contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array). Some of the Enhanced Collections Framework are described below:
- Enhanced Collections Framework - The Collections Framework has these new convenience APIs:
- Added Collections.singletonList and Collections.singletonMap.
Previously, there was a convenience implementation for singleton Set, but no corresponding implementation for List and Map. Both of these implementations proved desirable in practice. - Added Collections.EMPTY_MAP.
Previously, there were constant convenience implementations for the empty Set and List, but no corresponding implementation for Map.
The following special-purpose implementation has also been added: - Added Map constuctor for WeakHashMap. The Map interface dictates that most Map implementations should have a "copy constructor" that takes a Map argument. WeakHashMap lacked such a constructor in the 1.2 release.
- Added Collections.singletonList and Collections.singletonMap.
Let's take an example of java.util collection.
import java.util.*; { |
Java Discussion
- - Java web application
- - Difference between BMT an
- - Replace getParameterValue
- - Interviewing Next week -
- - Sudoku solver




