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

Which sorting algorithm is in place?

535


What does @param args mean in java?

549


How do you test a method for an exception using junit?

527


Difference between a class and an object?

571


What do bitwise operators do?

522






Why convert an applet to an application?

614


What is merge sort in java?

579


Difference between nested and inner classes ?

600


What is the SimpleTimeZone class?

1794


Why should I use abstract class?

562


What is the default value of byte datatype in java?

479


How do you write a conditional statement?

515


Explain how can you debug the Java code?

586


What is the generic function?

525


Can we define package statement after import statement in java?

556