Hello World! in Java

  1. Displaying the Hello World! Program
/* This is a simple Java program. 
FileName : "HelloWorld.java". */
class HelloWorld 
{ 
	// Your program begins with a call to main(). 
	// Prints "Hello World!" to the terminal window. 
	public static void main(String args[]) 
	{ 
		System.out.println("Hello World!"); 
	} 
} 
OUTPUT:
Hello World!
Translate »