

This statement is used to print text on the screen as output, where a system is a predefined class, and out is an object of the PrintWriter class defined in the system. All Java statement ends with a semicolon. You can also use the print () method instead of the println() method. The method println prints the text on the screen with a new line. If your Java program is run through the console, you can pass the input parameter, and the main () method takes it as input. It is an array where each element of it is a string, which has been named as “args”. main is a method this is a starting point of a Java program. main () is declared as void because it does not return a value. The word void indicates that a method does not return a value. The word static used when we want to access a method without creating its object, as we call the main method, before creating any class objects.
#ECLIPSE IDE FOR JAVA DEVELOPERS VS EE CODE#
When the main method is declared public, it means that it can also be used by code outside of its class, due to which the main method is declared public. Comment can be used anywhere in the program to add info about the program or code block, which will help developers understand the existing code in the future easily. The public word means that it is accessible from any other class. All class names must start with a capital letter. Writes the words "Hello Java" on the screen */

Name of this file will be “Hello.java.” As mentioned above in the sample program The name of the class is “Hello”, in which the main method is, then this file will be named “Hello.Java”.
