"Main.java:3: error: class JavaProgram is public, should be declared in a file named JavaProgram.java public class JavaProgram" getting error on every class while compiling the program

help me with solution for this problem

Read FAQ. The error is self explanatory.

//