This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Generaly it is not an error to set "default" the class, but the error appears if you try to run it throught the "java HelloWorldApp" command; in this case the JVM cannot access the main method (because the class is not public).
To test that it just try to modify your HelloWorldApp file as
Note that in this case the code will give you an error if you define public the Test class because as defined in the Java syntax one file can contain one public class with a public static void main(String args) method.
I think the keyword "public" is used so that other classes in the same package or in the different package can use this class. If you dont declare HelloWorldApp class as public it means its using a default access(you can use this class only in the current package, hence even if you dont use public keyword for HelloWorldApp there should not be any compiler error.