View RSS Feed

Java Collection

Java Collection Framework

Rate this Entry
by , 01-08-2012 at 11:19 AM (3467 Views)
List, Map and Set are the core interfaces supported by collection framework. Collection interface is extended by List and Set. There is also a Collections class in java that is a utility class and does not confuse it.
A Set contains only unique elements and prevents duplication. Set is implemented by HashSet and TreeSet. List is a collection of ordered elements and it may contain duplicates. List is implemented by ArrayList, LinkedList and Vector.

Map supports key value mapping. It may contain duplicate values but keys must be unique in a map. Map is implemented by HashMap, TreeMap and Hashtable.

Name:  51.JPG
Views: 3308
Size:  31.8 KB

Java Collection Framework

Benefits of Collection Framework

Polymorphic algorithms
Set algebra
Performance
Thread-safety
Immutability
Extensibility

Submit "Java Collection Framework" to Facebook Submit "Java Collection Framework" to Digg Submit "Java Collection Framework" to del.icio.us Submit "Java Collection Framework" to StumbleUpon Submit "Java Collection Framework" to Google

Categories
Tutorial

Comments