“verknüpfte Liste gegen Vektor” Code-Antworten

verknüpfte Liste gegen Vektor

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

Vektor gegen verknüpfte Liste

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

Ähnliche Antworten wie “verknüpfte Liste gegen Vektor”

Fragen ähnlich wie “verknüpfte Liste gegen Vektor”

Weitere verwandte Antworten zu “verknüpfte Liste gegen Vektor” auf Java

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen