Hello World in Java

Sample HelloWorld Program in Java Language.The keyword class begins the class definition for a class named name
package com.technicalkeeda.app;

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }

}

Compile and execute

javac HelloWorld.java command is used to compile the source code.

Output

Hello, world!