Error in code Editor

i doing challenges of linked list ll-k reverse
since my code is running in my compiler same code but not in your code editor
its showing

Main.java:3: error: class LinkedList is public, should be declared in a file named LinkedList.java
public class LinkedList {

change class name to β€˜Main’ instead of linkedlist