The class collection is consists exclusively of static methods that operate on or return collections. It contains polymorphic algorithms that operate on collections, "wrappers" which return a new collection backed by a specified collection, and a few other odds and ends.
Types of Collection in Java
- Array - Most efficient way to hold references to objects.
- Iterators - Select each element in a collection as Iterator (i).
- Collections(also called containers) - collection is a group of data manipulate as a single object.
Collection (i) Set (i) -- HashSet (c) -- TreeSet (c) List (i) -- ArrayList (c) -- LinkedList (c) Map (i) -- HashMap (c) -- TreeMap (c)
Limitation of Collection
- Collection have following limititaions
- Collection object and variable can't check at the compile time.
- It is resizable, so utilize dynamically Allocated Memory.
- Command collection must be used for collect a data.
- Must cast to correct type( i.e. type casting).
- Major limitation of collection, It user use JVM 1.4.2 version, than this JVM software might be crash during data Collection.