Saturday, December 3, 2011

java Collections overview


Collections are data structures are used to represents a group of elements stored under a single name.
Different operations like searching, sorting, insert, delete and filter operations will be performed on collection classes

Java provides several classes and interfaces to deal with collections

Java collections are defined in java. util package
java.util.Collection and interfaces are root interfaces which all collection classes are extending either one of the interfaces.

Collection interfaces

following are the different collections that we used in Java
1. Vector:-
It is an implementation of the list's class and accommodation the allowable array of objects i.e dynamic Synchronized. order of the elements is insertion order. 2.ArrayList:-
same as Vector except for synchronized supports dynamic array. unsynchronized. order of the objects is in insertion order.
3.LinkedList:- is also same as ArrayList when we will use LinkedList;- retrieving objects is faster compared to ArrayList and Vector


Note: Only a member of this blog may post a comment.