public class Hello { public static void main(String[] args) { System.out.println("Hello world!"); } }
public class Hello { // This is the class declaration public static void main(String[] args) { System.out.println("Hello world!"); } }
public class Hello { // This is the class declaration public static void main(String[] args) { // This is the main method declaration System.out.println("Hello world!"); } }
public class Hello { // This is the class declaration public static void main(String[] args) {// This is the main method declaration System.out.println("Hello world!"); /* System is a class. Out is a static member of type PrintStream. println is a method of the PrintStream class. */ } }