Explain the difference between arraylist and linkedlist in java?



Explain the difference between arraylist and linkedlist in java?..

Answer / Bhupender Singh Bisht

ArrayList is a resizable-array implementation of the List interface. It provides fast access to elements at any index, but inserting and deleting elements may be slow for large lists because it requires shifting elements. LinkedList, on the other hand, is a doubly-linked list implementation of the List interface. It allows fast insertion and deletion at the beginning or end of the list, but accessing elements by index can be slower than ArrayList.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can an interface have a class?

1 Answers  


Is it possible for yielded thread to get chance for its execution again ?

1 Answers  


What is a data structure java?

1 Answers  


Can static method access instance variables ?

1 Answers  


What is meant by throwing an Exception?

4 Answers   Accenture,


Wha is the output from system.out.println(“hello”+null); ?

1 Answers  


Which is easier .net or java?

1 Answers  


What is widening and narrowing in java? Discuss with an example.

1 Answers   Amdocs,


What is an interface in java?

1 Answers  


When should I use singleton pattern?

1 Answers  


What is the function of http?

1 Answers  


Why do we need hashmap in java?

1 Answers  


Categories