What is the difference between Array and ArrayList in Java ?

What is the difference between Array and ArrayList in Java ?

Team Leader Asked on June 18, 2017 in JAVA.
Add Comment
1 Answer(s)

{1}Array is static in nature[length is fixed].You can’t change its size once it is created.
ArrayList is dynamic in nature. ArrayList is also called as dynamic array or re-sizable array.

{2}The size of an array can be checked using its attribute called length.
The ArrayList provides method called size() to check its size.

{3}Array is multi-dimensional. You can have one, two or three dimensional arrays.
ArrayList is one dimensional.

IT Head Answered on June 20, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.