Computer Science, asked by ra8kochikeynsharma, 1 year ago

difference between array and arraylist in java

Answers

Answered by nikithamegha
0
Array is the object and it stores the object of same type.
Eg : Its stores complete integer types or string types.
int[] IntArray = new int[3];
string[] StringArray = new StringArray[2]

Arraylist is the collection in which we can store the
objects of any data type.

Eg : Arraylist Arr = new Arraylist()
Arr.Add(13); // Integer Type
Arr.Add(10); // String Type.

Arrays has the Fixed Length where as the Arraylist 
varies the length as the objects Added. 
Similar questions