The code below does not compile:
package app1;
public class main{
public static void main(String args[]){
System.out.println("Hello World!");
}
}
The following message appears in the terminal:
Error: Could not find or load main class main
the main.java
file is saved in the app1
folder. I am compiling the terminal in Manjaro.
I do not understand, when I compile in the IDE (either NetBeans or Eclipse) the code runs, but the terminal goes wrong. Thanks in advance for your attention.