How to write hello world program in Java

Hello World in Java

By Yashwant Chavan, Views 1238, Date 21-May-2012

Sample HelloWorld Program in Java Language.The keyword class begins the class definition for a class named name

tags java hello-world

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!
Yashwant

Yashwant

Hi there! I am founder of technicalkeeda.com and programming enthusiast. My skills includes Java,J2EE, Spring Framework, Nodejs, PHP and lot more. If you have any idea that you would want me to develop? Lets connect: yashwantchavan[at][gmail.com]