What is the major difference between linkedlist and arraylist?



What is the major difference between linkedlist and arraylist?..

Answer / Shruti Agarwal

The main differences between LinkedList and ArrayList are:
1. Implementation: ArrayList uses an array to store elements, while LinkedList uses a chain of nodes.
2. Efficiency of Access: ArrayList provides fast access to elements at specific indexes due to its underlying array structure, whereas LinkedList requires traversal through the linked nodes for similar operations.
3. Insertion and Deletion Efficiency: Insertions and deletions are more efficient in LinkedList as it only needs to adjust pointers (rather than shifting all subsequent elements), while ArrayList requires rearranging elements upon insertion or deletion.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What does jre stand for?

1 Answers  


What is the internal implementation of set in java?

1 Answers  


why interfaces are faster than abstract classes?

4 Answers  


Is Java Class Threadsafe ????? How to make Java class Thread safe??

2 Answers   Cognizant,


What is a databasemetadata?

1 Answers  


What is yield () in java?

1 Answers  


What is difference between hash mapping and hash table?

5 Answers   NDS, Wipro,


what are Checked & Unchecked exceptions ?

2 Answers  


what is the difference between object and class

10 Answers   IBM,


What occurs when an object is constructed?

1 Answers  


What is this keyword used for?

1 Answers  


What an i/o filter in java programming?

1 Answers  


Categories