Difference between array and arraylist.

Answers were Sorted based on User's Feedback



Difference between array and arraylist...

Answer / 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

Difference between array and arraylist...

Answer / brijendra kumar soni(xavient)

Array is the Coolection of similar type of object.the size
of array is fixed while Array list is the collection of
different data types and the size of array list is growable.

Is This Answer Correct ?    3 Yes 1 No

Difference between array and arraylist...

Answer / sakshi jauhari

Arraylist is written as
ArrayList<String> arr= new ArrayList<String>();
whereas array is specified for a single data type object
only like..
int[] ar = new int[6];

Arraylist can be specified for any data type object that it
can store.
its range can also be resized which is not possible in
array.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Core Java Interview Questions

How many types of array are there?

0 Answers  


What is boolean query?

0 Answers  


What is the difference between a method and a function in alice?

0 Answers  


Define packages in java?

0 Answers  


how to convert mm/dd/yy to dd/mm/yy using collections in java.

4 Answers   Bosch,






What is hash table in java?

0 Answers  


What are java annotations?

0 Answers  


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?

0 Answers  


whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net

0 Answers  


How java is similar to c?

0 Answers  


solve (x-1)(x-9)=8;

3 Answers   IBM, Manhattan, TCS,


all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.

4 Answers  


Categories