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
Why does java does not support multiple inheritance? Explain
What is a bubble sort in java?
Is there any difference between nested classes and inner classes?
What is Mutex (Mutual Exclusion Object) ?
Can we instantiate interface in java?
Which class is the superclass of all classes?
Is the milky way in a void?
What is the purpose of a volatile variable?
Which list is sorted in java?
Explain java coding standards for methods?
In a container there are 5 components. I want to display all the component names, how will you do that?
which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com
What is <> used for in java?
give an example for encapsulation?
Can a constructor be made final?