Linked List in Java

chain it up and ship it

It is a doubly linked-list, deal with it.

Initialisation

import java.util.LinkedList;

public class Main {
  public static void main(String[] args) {
    LinkedList<String> cars = new LinkedList<String>();
    cars.add("Volvo");
    cars.add("BMW");
    cars.add("Ford");
    cars.add("Mazda");
    System.out.println(cars);
  }
}

Just refer to the documentation for the methods

read more

Last updated