Hello World

Aim:

This webpage demonstrates a simple Java program that prints "Hello World" to the console.

Algorithm:

The algorithm is as follows:

  1. Create a Scanner object to take input from the user.
  2. Print "Hello World" to the console.

Java Code:

import java.util.Scanner;

class HelloWorld {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("Hello World");
    }
}
            

Output: