ArrayList vs LinkedList vs Vector
ArrayList vs LinkedList vs Vector
ArrayList | LinkedList | Vector | |
Data structure | Index-based dynamic array | Doubly linked list | Growable array |
Increment size | 50% | No initial size | 100% |
Traverse | Uses iterator | Uses iterator | Uses enumeration |
Memory usage | Less memory usage | More memory usage | |
Accessibility | Random and fast | Sequential and slow | Random and fast |
Order | Insertion order | Insertion order | Insertion order |
Duplicates | Allow | Allow | Allow |
Insert / Delete | Slow | Fast | Slow |
Synchronized | No | No | Yes |
Implements | RandomAccess interface | NA | RandomAccess interface & Serializable interface |
Null values | Yes | Yes | Yes |
0 comments :
Post a Comment