Difference between array and arraylist.

Answer Posted / vibhor

An ArrayList is resizable, where as, an array is not.
ArrayList is a part of the Collection Framework. We can
store any type of objects, and we can deal with only
objects. It is growable. Array is collection of similar
data items. We can have array of primitives or objects. It
is of fixed size. We can have multi dimensional arrays.
Array: can store primitive ArrayList: Stores object only
Array: fix size ArrayList: resizable
Array: can have multi dimensional
Array: lang ArrayList: Collection
framework

Is This Answer Correct ?    98 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a green thread? : Java thread

565


Can an integer be null java?

549


how to convert Java project into Maven ?

576


Is it possible to specify multiple jndi names when deploying an ejb?

550


When is the finalize() called? What is the purpose of finalization?

573






Can we call a non-static method from inside a static method?

551


What does the three dot emoji mean?

574


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

1527


What is the static keyword?

581


Can we initialize the final blank variable?

576


Why java applets are more useful for intranets as compared to internet?

571


What is finally block?

558


What is the purpose of finalization in java programming?

554


What are different types of control structures?

482


Why java is a platform independent? Explain

526