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

List the features of java programming language.

561


How do you declare an empty string?

619


What is string immutability?

538


Are private methods final?

483


What is method reference in java?

559






What is an image buffer?

531


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

634


What is number data type in java?

551


What are extraneous variables examples?

522


Can a static method be overridden in java?

557


What do you mean by singleton class in java?

514


What is a numeric digit?

584


What data structures are used to perform recursion?

604


What does @override mean?

530


What is the purpose of garbage collection in java, and when is it used?

559