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
What is the properties class in java programming?
Define an abstract class with reference to java.
How do you remove duplicates in java?
How many bytes is a string java?
What is ternary operator? Give an example.
What's the purpose of using break in each case of switch statement?
What are structs in java?
give an example for encapsulation?
Explain about main() method in java ?
What is autoboxing in java?
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?
What is ternary operator in java?
Why local variables are stored in stack?
Explain about anonymous inner classes ?
What are kinds of processors?