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 |
What does jre stand for?
What is the internal implementation of set in java?
why interfaces are faster than abstract classes?
Is Java Class Threadsafe ????? How to make Java class Thread safe??
What is a databasemetadata?
What is yield () in java?
What is difference between hash mapping and hash table?
what are Checked & Unchecked exceptions ?
what is the difference between object and class
What occurs when an object is constructed?
What is this keyword used for?
What an i/o filter in java programming?