1.

Collections API in Java

Answer»

A group of objects can be STORED and manipulated using an architecture that is provided by the Collections API in Java. All the possible operations in Java such as searching, sorting, deletion, insertion etc. can be performed using the Java Collections.

A HIERARCHY of collections in Java is given as follows:

Some of the characteristics of the Collections API in Java are given as follows:

  1. There are some Collections that don’t allow duplicate elements.
  2. Some Collections may use linked lists to store the elements. All the elements in a linked list have a reference to the previous and the NEXT elements in the linked list. It is easier and much faster to insert elements in LinkedList as COMPARED to ArrayList.
  3. Some Collections may use arrays to store the elements. The array can be resized dynamically to store more and more elements as required.
  4. Some Collections may use hash tables to store the elements. These tables contain specific keys for all the elements that they store.
  5. Some Collections may use TREES to store the elements. Tree based storage is quite useful for storing elements.


Discussion

No Comment Found