Thursday 31 March 2016

Difference Between Array and Collection

Difference Between Array and Collection

The main difference between Array and Collection is; We can't increase size of Array but in case of Collection we can decrease or increase size of collection according to our requirement.


difference between array and collection

Below we discuss one by one array and collection features;

Features of Array:


  • Array is fixed in size.
  • Memory point of view arrays is not recommended to use.
  • It shows very good Performance
  • Array Can hold only Homogeneous data elements.
  • Arrays can hold both primitive data types and objects
  • In terms of performance, Arrays are better.

Features of Collections:

  • Collection are Growable in nature.
  • Memory point of view collections are recommended.
  • It shows poor Performance.
  • It Can hold both homogeneous and Heterogeneous .
  • Collections hold only Objects.
  • In terms of performance Collections are slower
I hope all above differences are helpful for you. For more information you can visit our website.

No comments:

Post a Comment