error in java code

error is : file not named as java class name
error is shown at the line where class is beginning

Solution 1) Remove public from class name,use

class codechef

instead of

public class codechef

Solution 2) Use class name as Main in your code

class Main

Hope it helps :slight_smile:

1 Like
//