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 a conditional statement explain with example?
What is a key in java?
enlist some features of jdk.
Explain differences between collection api and stream api?
Give me an example of array and linked list? Where they can be used?
What are the two environment variables that must be set in order to run any java programs?
What are synchronized methods and synchronized statements in java programming?
Where local and global variables are stored?
What is the difference between Java and C++?
What does indexof return in java?
How do listeners work?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
What restrictions are placed on method overloading in java programming?
Explain about main thread in java?
What is the use of http-tunneling in rmi?