Java Hello World

In this example, we are giving a program to display "Hello World!".


Displaying "Hello, World!":

  1. # displaying hello world!
  2. class HelloWorld
  3. {
  4. public static void main(String args[])
  5. {
  6. System.out.println("Hello, World");
  7. }
  8. }

Output:

Hello, World!