> For the complete documentation index, see [llms.txt](https://dev117uday.gitbook.io/notes-md/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev117uday.gitbook.io/notes-md/java/data-structures/linked-list-in-java.md).

# Linked List in Java

chain it up and ship it

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

## Initialisation

```java
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](https://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html)
