Wednesday, September 9, 2009

Java Collection Frame work

Java collection pages are more useful in the development of the applications. Collection is an object which stores the objects such as ArrayList, Vector...etc

The basic interface in collection frame work is Collection. Other interfaces are Set, List, SortedList.
1. When sequence matters
2. When you know index position
3. Duplicates are allowed.

1. When uniqueness matters
2. You can never have more then one element referencing the same object
3. Does not allow Duplicates.

1. Key value pairs
2. Maps know the value associated with the given key.
3. You can have two keys that refer the same value but you cannot have a duplicate key(A key can be any object).

The basic advantages of Collection frame work are:
By providing data structures and Algorithms internally the reduces the Programming effort.

No comments: