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
How do you create a first line indent?
What is difference between word and integer?
What is singleton class and how can we make a class singleton?
Is empty string in java?
Does constructor be static?
What is nullpointerexception in java?
What is bifunction in java?
Is c better than java?
What is wrapper class html?
Can an integer be null java?
What is a marker interface?
Where are variables stored?
Explain the available thread states in a high-level?
What is a final class ?
Can we rethrow the same exception from catch handler?