Difference between array and arraylist.

Answer Posted / vinod agarwal

Array:array is the one which can save similar data typed
elements.
And the size is limited.

Arraylist:it is also a type of array in which we can extend
size
dynamically.
syntax:
ArrayList ar=new ArrayList();
where ArrayList is a class

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is an object subject to garbage collection?

769


Can a final variable be null?

738


Define array. Tell me about 2-D array.

782


Can we have multiple classes in a single file?

704


If a method is declared as protected, where may the method be accessed in java programming?

688


What is a class object?

681


Can we override static methods in java?

790


What are the restrictions imposed on method overriding?

761


What is the locale class in java programming?

730


What are void pointers?

955


What is a literal coding?

711


Is sizeof a preprocessor?

721


What is keyset in java?

827


What is a treemap in java?

731


Explain the inheritance?

746