7
Reply

What is difference between collection and array?

Sandeep Kumar

Sandeep Kumar

8y
4.6k
0
Reply

    We using Array means datatype can be defined in compile time but collection means datatype defined in runtime.

    Array have fixed lengths where collections can be of dynamic length.

    Collection is higher level, array is subset of Collection

    Collection is higher level, array is subset of array

    Array is of fixed size and is a collection of similar data type. Collection has a dynamic size and support heterogeneous datatypes.

    Difference between array and collection is 1. Array is group of similar data type object. Collection is group of homogeneous and heterogeneous data type object. 2.Array is fixed in size. Collection is not fixed in size. 3.Array is strong type. Collection is not strong type.We use generic type to make it strong. Note:The difference between array and collection or array and list or array and datalist will be same.

    Difference between array and collection is 1. Array is group of similar data type object. Collection is group of homogeneous and heterogeneous data type object. 2.Array is fixed in size. Collection is not fixed in size. 3.Array is strong type. Collection is not strong type.We use generic type to make it strong. Note:The difference between array and collection or array and list or array and datalist will be same.