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
Explain the importance of thread scheduler in java?
What is the lifetime and scope of a variable?
Explain the difference between string, stringbuffer and stringbuilder in java?
What happens when you add a double value to a string?
What are the advantages of encapsulation in java?
What is your platform?s default character encoding and how to know this?
How do you initialize an arraylist in java?
What is the purpose of lambda expressions?
Can we compare two strings in java?
What are the different types of garbage collectors in java?
What is the largest data type in java?
How many types of gc are there in java?
Can a class be protected in java?
Why do we need wrapper class?
How do you bind variables?