Interviews8 answers
What is difference between collection and array?
8 Answers
Array:
Array has fixed in size.
We can't insert the values in between the arrays
Also we can't remove the values form middle of an arrays.
There is no boxing and unboxing process on Array
Collections:
Collection has dynamic in size.
We can insert item in between of the collection
We can remove an item from middle of collection
There is process of Boxing and Unboxing on Collection.
Shaikh AteequePosted Feb 6, 2019, 7:02 PM EST
We using Array means datatype can be defined in compile time but collection means datatype defined in runtime.
Bhakiyalakshmi SelvamPosted Jan 29, 2017, 9:13 PM EST
Array have fixed lengths where collections can be of dynamic length.
Vishal JadavPosted Sep 16, 2016, 11:56 PM EDT
Collection is higher level, array is subset of Collection
Bhuvanesh MohankumarPosted May 30, 2016, 9:10 AM EDT
Collection is higher level, array is subset of array
Bhuvanesh MohankumarPosted May 30, 2016, 9:10 AM EDT
Array is of fixed size and is a collection of similar data type.
Collection has a dynamic size and support heterogeneous datatypes.
Anil Kumar MurmuPosted Jan 13, 2016, 1:11 AM EST
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.
Posted Jan 9, 2016, 1:48 AM EST
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.
Sandeep KumarPosted Dec 27, 2015, 12:11 AM EST




