Difference between Array and Collection?

  • The difference between Array and Collection are as follows..

    Array Collection
     1.Array is a collection of similar Homogeneous element.  1.Collection is collection of homogeneous and hetrogeneous element.
     2.Array is a fixed size.  2.Collection is dynamic growable.
     3.Chance of memory wastage.  3.No memory wastage problem.
     4.Store data type as well as object type.  4.Stores only object type.
     5.Sorting, Searching, Reversing, Shuffling done by programmer written code.  5.Sorting, Searching, Reversing, Shuffling done by build in methods of Collection class.
     6.Middle of insertion not possible directly.  6.Middle of insertion is possible by  build in methods of Collection.
     7.Build in methods are not available in array.  7.Build in methods are available in Collection.
     8.More space is required to performed Operation.  8.Less space is required to performed Operation.

Leave a Comment