list
7 tutorials tagged “list”.
- Difference Between ArrayList and LinkedListArrayList vs LinkedList in Java: internal structure, speed of get, add and remove, memory use, and how to choose, with a timing example.
- Difference Between ArrayList and VectorArrayList vs Vector in Java: synchronization, performance, growth rate, legacy methods and iteration. Learn the differences and which one to use.
- Arrays.asList vs List.ofArrays.asList and List.of both create lists quickly, but differ in mutability, null support and their link to the array. Learn every difference with examples.
- ArrayList in JavaArrayList is a resizable array that grows automatically. Learn how to create one, add, get, update, remove, search, sort and loop over its elements.
- LinkedList in JavaLinkedList is a doubly linked list that implements both List and Deque. Learn its structure, methods and examples, and when it beats ArrayList.
- Vector in JavaVector is a legacy, synchronized resizable array that implements List. Learn its methods, how it grows, and why ArrayList replaced it.
- List Interface in JavaThe List interface represents an ordered collection that allows duplicates and access by index. Learn its methods, implementations and examples.