Difference between array and arraylist.

Answer Posted / bhavani

ARRAY:collection of same data items.
2.array is always of fixed size.
3.initializing an array is too long,then it results in wastage
of memory in heap.
ARRAYLIST : Collection of different data objects.
2.Dynamic in nature.
3.automatic resizing of the list.
4.methods used is:add,remove,insert,clear,sort,reverse....

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I stop concurrentmodificationexception?

513


Where can I find jdk in my computer?

468


Does variable declaration allocate memory?

587


Is there any limitation of using inheritance?

571


What is the difference between char and char *?

569






What is diamond operator in java?

503


What are the three best choices for a development environment?

612


Differentiate between class and structure.

635


why Java does not support multiple inheritances?

706


What are the two ways of implementing multi-threading in java?

820


What is nested class?

571


Explain when classnotfoundexception will be raised ?

569


What is the final class?

552


Is string is a data type?

571


What is mean by encoding?

629