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 super constructor?

638


How to optimize the javac output?

687


What are the differences between c++ and java?

673


Name few java 8 annotations ?

684


What is class and its types?

631






What is the difference between declaration and definition in java?

598


What are the types of web technologies?

645


What are some examples of variable costs?

582


Is assembly language a low level language?

580


Can we use string in switch case in java?

670


What occurs when an object is constructed?

654


how do I create a runnable with inheritance? : Java thread

621


Define array. Tell me about 2-D array.

680


What is the use of singleton?

604


Why strings in java are called as immutable?

671