Error in LinkedList palindrome

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

@gargayush01 In hackerblocks your first class will always be named as β€˜Main’. Rename LinkedList as Main in your whole code.
Eg-
import java.util.*;
public class Main{
}