6 March 2013

What is the difference between arrays and collection?


Array:
  1. You need to specify the size of an array at the time of its declaration. It cannot be resized dynamically.
  2. The members of an array should be of the same data type.

Collection:
  1. The size of a collection can be adjusted dynamically, as per the user's requirement. It does not have fixed size.
  2. Collection can have elements of different types.