How do you explain then what is public, static and the String array? Better show this full-fledged OO program and say: "When the HelloWorld object is created, the constructor is executed".
You compile the source program as usual with javac HelloWorld.java (or your favorite IDE). To run the program without main, you just replace java by javaoc (resp. javaw by javaocw). To have backward compatibilty, javaoc resp. javaocw will invoke main, when it is present. |
||||||||