Difference between Array ad Collections(Or any collection class)
|1.Arrays are fixed in size.||1.Collections are growbable in nature i.e based on requirement we can increase or decrease the size.|
|2. With respect to memory arrays are not recommended to use.
|2. With respect to memory collections are recommended to use.|
|3. Arrays can hold only homogeneous data type elements.
|3.Collections can hold both homogeneous and heterogeneous.|
|4. With respect to performance arrays are recommended to use.
|4. With respect to performance collections are not recommended to use.|
|5. There is no underlying datastructure for arrays and hence readymade method support is not available.
|5.Every collection class is implemented based on some standard datastructure hence readymade method support is available.|
|6.Array can hold both primitive and object types.
|6.Collections can hold only object types, but not primitive types.|