SauravShrestha04 / JavaHelloWorld-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java Hello World Example

In this tutorial we will create the most basic program in Java. i.e. Hello World Program. Since Java is object-oriented, programs are organized into modules called classes, which may have data in variables and subroutines called methods. The only way to learn a new programming language is to write programs in it. The first program to write is the same for all languages. The Program below Prints the words Hello, World

/*************************************************************************
* Compilation: javac HelloWorld.java
* Execution: java HelloWorld
*
* Prints "Hello, World". By tradition, this is everyone's first program.
*
* % java HelloWorld
* Hello, World
*
*
*************************************************************************/
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}

About


Languages

Language:Java 100.0%