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 to convert string to int in java?
strings in java are objects.why?
byte a=5; byte b=5; byte c=a+b; System.out.println(c); whats the o/p?
Explain Connection Pooling?
What is java util collection?
What is the argument type of main() method?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
Does 'true' and 'false' are keywords?
What is the locale class in java programming?
what is difference between business delegate and data access object(dao)? in java?
what is sendredirect?
What are the rules for naming an array?