Java Collections Framework
- The Collection framework, which took shape with the release of
JDK 1.2 and was expanded in JDK 1.4
- All java collection interfaces and classes kept in
java.util package.
- Classes like ArrayList, Vector,LinkedList, HashSet, TreeSet, LinkedHashSet, HashMap etc. use to add, reterive, remove, find and iterate the objects
Collection Framework Hierarchy
Collection comes in four flavours
- List - List of things, it care about index of the object.
- Set - Unique things, no duplicate allowed
- Map - Things with a unique id(key)
- Queue - Things arranged by the order in which they are to be processed. (java 5/JDK 1.5 onwards)
| List |
Set |
Map |
Queue |
Utility |
| ArrayList |
HashSet |
HashMap |
PriorityQueue |
Collections |
| Vector |
TreeSet |
Hashtable |
|
Arrays |
| LinkedList |
LinkedHashSet |
TreeMap |
|
|
|
|
LinkedHashMap |
|
|