What is the difference between array and arraylist?
what is the difference between arraylist and linkedlist?
Answer Posted / ram
array contain a similar data type and array size is fixed i.e
dynamically its size can't be changed.
but arraylist can store more then one data type and its size
can be changed dynamically.
one major difference is that,array used to store primitive
data type(i.e. int,char etc) while arraylist is used to
store objects.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are the types of arrays in java?
What is a string token?
Can we define private and protected modifiers for the members in interfaces?
Is java 9 released?
What is volatile data type?
Can we override a variable in java?
Can we have a try block without catch block?
What is t in generics in java?
What is difference between adapter class and listener?
Can we have any code between try and finally blocks?
how does the run() method in runnable work? : Java thread
What is the difference between access specifiers and access modifiers in java?
What are the different types of inner classes?
Can we serialize arraylist in java?
What if constructor is protected in java?