When I run the below code, I get the error that Could not find or load main
class. I have removed the package and created it again. But the error is still exist. I did some methods to fix it such as right clicking on package name -> properties -> run
option to change the main
method but there is nothing. But if I create another package name and write this code in it, the program work.
package craps;
public class Craps {
public static void main(String[] args) {
int number = 10;
System.out.println(number);
}
}