Difference between array and arraylist.
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
How many types of array are there?
What is boolean query?
What is the difference between a method and a function in alice?
Define packages in java?
how to convert mm/dd/yy to dd/mm/yy using collections in java.
What is hash table in java?
What are java annotations?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
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
How java is similar to c?
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.