|
I don't understand your question.
System.out.println is required in order to print out text to the screen in Java CLI. You cannot just place "Hello World" on a line and have it displayed on the screen.
public static void main(String[] argv) is required. This is the entrance method to the application, and at least one main method is required in order to execute the application. When you create a jar, you can specify which class' main method will be the application entrance point. Calling java does not allow you to specify what method is called, so therefore you must call java on an entire class which resolves the main method as the entrance. This is the same in a lot of lanauges; C# and C both have the main methods, and languages like PHP use dummy main() in any userspace code not blocked into a function.
|