Wednesday 18 November 2015

What is the Difference between Arrays & Collection ? What is the structure of Collection



Array : It is an indexed collection of fixed number of homogeneous data elements.
Collection : It is a group of objects as a single entity


S.No
Arrays
Collection
1
Arrays are fixed in size.
Collections are growable in nature
2
It supports only Homogeneous data elements
It supports both homogeneous and heterogeneous data elements
    3
There is no underlying data structures like Hashtable, LinkedList ..etc. i.e., there is sorting, searching ...etc predefined methods are not available from API
It supports standard data structures like Hashtable, LinkedList...etc. i.e., there is sorting, searching ...etc predefined methods are available from API

No comments:

Post a Comment