The below written line throws error whenevr i try to initialise it how can i overcome it

LinkedList queue = new LinkedList();

If your class name is Linkedlist please change it to main and the calls to the class too