Pages

Collection FrameWork : Page-2

What are the differences between old array based implementation and Collection Framework based implementation of any data structure in Java?

   Array based implementation :            
  1. Fixed in size                                    
  2. Can hold only homogeneous data but not heterogeneous data
  3. Ready-made methods support is not available for any operation
  4. Performance is high, and recommended to use to obtain better performance
  5. Needs continuous memory and memory utilization is not good
  6. Can hold both objects and primitive
  CollectionFramework based implementation :
  1. dynamic size, we can grow or reduce size
  2. Ready-made methods support is available for various operations
  3. Performance is not good.
  4. Memory utilization point of view Collection is highly recommended
  5. Can hold only objects but not primitives
What are the key interfaces of Collection Framework?

Collection Framework provides following 9 important interfaces:
  1. Collection : It is high level representation of a group of individual objects as a single entity. It is root interface of Collection framework and declares the most common methods which can be applicable for any Collection object.
  2. List : It is high level representation of a group of individual objects as a single entity where insertion order is preserved and duplicates are allowed.
<<Previous                                                                                                   Next>>

No comments:

Post a Comment