So first of all I am new to this side, so please don't be to hard if I make some formal mistakes.

So I am trying to learn a bit about linked lists in Java. I created now a linked list in the main method, which is called "liste" and a method called "addToList", which should add a string to my list. 

```
import java.util.LinkedList;

public class LinkedLists{

    public static void main(String[] args) {
        LinkedList<String> liste = new LinkedList<String>(); 
        addToList("Mario");
    }

    public static void addToList(String pElement) {
        liste.add(pElement);
    }

}

```

When I add an element in the main method and print it out, it works fine, but when I do it this way I get this error:

```none
Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
    liste cannot be resolved

        at LinkedLists.addToList(LinkedLists.java:11)
        at LinkedLists.main(LinkedLists.java:7)

```