Collections in Java
A collection is a general term that means something like "a bunch of objects stored in a structured manner". Java has various standard collection classes and using collections in Java allows you to organise data in memory in various convenient ways. Examples might include:
a simple list of strings;
a mapping or association of strings to strings (e.g. country names to the names of their capitals);
a list that imposes some constraint, e.g. keeping strings in alphabetical order, or not allowing duplicates in the list.
The Java Collections Framework— often called simply (Java) Collections— is a library of classes that implement these and various other data structures. The collections framework also provides utility methods to perform functions such as sorting a list of data.
Collections Interfaces:
1. Collection Interface.
2. List Interface.
3. Set Interface.
4. SortedSet Interface.
Collections Classes:
1. AbstractCollection.
2. AbstractList.
3. AbstracSequentialtList.
4. LinkedList.
5. ArrayList.
6. AbstractSet.
7. HashSet.
8. LinkedHashSet.
9. TreeSet.
Legacy Classes & Interfaces:
1. Enumeration interface.
2. Vector.
3. Stack.
4. Dictionary.
5. Hashtable.
6. Properties.
7. Using store() & load().
Other Important stuff in Collections Framework:
1. Accessing a Collection via an Iterator.
2. Storing User defined Classes in Collections.
3. Random Access Interface.
4. Map Interfaces & Classes.
5. Comparators.
6. Collections Algorithms.
No comments:
Post a Comment