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


Please Help Members By Posting Answers For Below Questions

What is java ceil?

575


What is a local, member and a class variable?

580


What is difference between arraylist and list in java?

589


Can we overload the methods by making them static?

507


Explain 5 features introduced in jdk 1.7?

615






How can we avoid including a header more than once?

615


Are arrays passed by reference in java?

492


How do you sort a set in java?

523


What is java lang object?

531


What are constants and how to create constants in java?

560


What does it mean to flush a file?

574


What are the types of java languages?

525


What is a map in java?

557


What is a static method in java?

543


Is call by reference possible in java?

540