What is the difference between array and arraylist?
what is the difference between arraylist and linkedlist?
Answer Posted / madhu sudana rao
first one:
array is fixed length,arraylist is growing array(means
they have no fixed length , if u add more the size
arraylist size incress and vise versa)
seond one:
if add and remove the elements in the middle takes more
time by using arrylist in that time use linkedlist
arrylist is good for retiveing the elements in specific
position
arraylist is faster than linkedlist for random accesing
of elemnets
| Is This Answer Correct ? | 20 Yes | 1 No |
Post New Answer View All Answers
Is empty list java?
How does hashset works in java?
Explain spliterator in java8?
Why do we need singleton class?
design an lru cache in java?
How use .contains in java?
What is java console application?
Can a class be private in java?
What is the latest java version?
Why is string class considered immutable?
How can an object be unreferenced?
What is hashing principle in java?
When should a function throw an exception?
What is treeset and treemap in java?
Is list thread safe in java?