“Lista vinculada vs vector” Código de respuesta

Lista vinculada vs vector

Compare Types of Lists in Java

ArrayList
(extends AbstractList implements RandomAccess, Cloneable, Serializable)
- is dynamic array
- accepts duplicate elements
- is non-synchronized

LinkedList
(extends AbstractSequentialList implements Deque, Cloneable, Serializable)
- is linked list data scructure
- accepts duplicate elements
- is non-synchronized

Vector
(extends AbstractList implements RandomAccess, Cloneable, Serializable)
- growable or dynamic array of objects
- similar to array, but can grow and shrink
- synchronized


- if getting/setting more, use arrayList
   --dynamic array perofrms better for get/set
- if adding/removing more, use linkedList
   --doubly linked list better for adding removing
- if multi-thread, use Vector over arrayList
   --vector's synchronized nature better for multi-thread
- if not multi-threaded, arraylist better 
   --because it's not synchronized, thus faster
Ten Horizons

Vector vs Lista vinculada

- LinkedList not synchronized, doubly linked
- Vector is synchronized, thread safe
Obedient Ocelot

Respuestas similares a “Lista vinculada vs vector”

Preguntas similares a “Lista vinculada vs vector”

Más respuestas relacionadas con “Lista vinculada vs vector” en Java

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código