It's showing error regarding saved file name error: class LinkedList is public, should be declared in a file named LinkedList.java

when i compile my code it shows this error(title). apart from this there is no error i have checked it in eclipse it’s running fine there.
error: class LinkedList is public, should be declared in a file named LinkedList.java
public class LinkedList

change your class name to Main ,that will solve this
if this solves your doubt please mark it as resolved :slight_smile: