Search This Blog

Friday, July 12, 2019

Difference between Array and ArrayList

Array Array is a fixed length data structure whose length cannot be modified once array object is created.
ArrayList   ArrayList is dynamic in nature which means it can resize itself to grow when required.



Arrays can be multi-dimensional
ArrayList is single dimensional.

Iterating over an array is faster than iterating over an ArrayList.Iterating over an ArrayList is significantly slower in terms of performance.


Takes less memory than ArrayList to store specified elements or objects.Takes more memory than the Array to store objects.

No comments :