Let us write a simple Java program to print "Hello World". /* * HelloWorld.java - simple java program to print "Hello World" */ public class HelloWorld { public static void main(String args[]) { // print "Hello World" System.out.println("Hello World"); } } Above is the simple Java program which would print "Hello World" on execution. While saving the Java program, please make sure that the file has .java extension and the name of the file matches with the name of the class that has main() function. We have stored the above source code in HelloWorld.java and the file names matches exactly with the name of the class in which main() function resides. Let us compile the above Java program. Basically, Java compiler would take Java source code as input and provide us bytecode version of the input Java program as output. As a result of compiling HelloWorld.java, we will get a class file named HelloWorld.class which contains byte...
The Only Shot to You need to kickstart your programming in any language