Even-After-Odd-linkedList-Practice

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

We only have to write the method then why this error is coming.

@yogesh4120,
your code is correct but its a technical glitch. So your class should be named Main instead of Linked List.
https://ide.codingblocks.com/s/253187 here is corrected code. Your code logic is correct, just need to change LinkedList to Main.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.