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
What is map java?
What is the use of a copy constructor?
Explain illegalmonitorstateexception and when it will be thrown?
What does system out println () do?
Does java isempty check for null?
What is ‘is-a ‘ relationship in java?
What is space character in java?
What is object class in java?
Differences between external iteration and internal iteration?
Explain a few methods of overloading best practices in java?
What is the tradeoff between using an unordered array versus an ordered array?
What is meant by collection in java?
What is a parameter example?
What is the function of static in java?
What do you understand by classes in java?