netBeans doesn't Execute the second code Why?
this works
package HelloWorldApp_pkg;
public class HelloWorldApp {
public HelloWorldApp() {
}
public static void main(String[] args) {
System.out.println("Howdy");
}
}
it doesn't work
package Project_1_Pkg;
public class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Howdy");
}
}
problem
"class HelloWorldApp is public, should be declared in a file named HelloWorldApp. java"
Can anyone explain to me why?