Difference between array and arraylist.
Answer Posted / 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 View All Answers
Is java a security risk?
Is java a software?
is it possible to instantiate the math class?
Define interface in java?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
Why isn’t there operator overloading?
What is string syntax?
What is a protected void?
What is a method in programming?
How to display arraylist values in java?
explain the difference between jdk and jvm?
Is string a class?
What is exception propagation?
What is immutability in java?
What are untrusted applets?