Thursday, June 2, 2016

Hello World Java

Let's start learning Java with the most basic Java program. That of course is the Hello World program for Java.

To make life easier when testing simple Java code snippets, I've embedded a Java REPL in a page. Just follow the link above to the Java REPL. Also since Java 9, you can just use Java's built in REPL by typing 'jshell' from the command line.

Type the following command in the REPL.

System.out.println("Hello World!");

and then press enter. You will see the following.

Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_72 on Linux 3.13.0-49-generic
Welcome to JavaREPL Web Console version 302
java> System.out.println("Hello World!");
Hello World!

That's all there is to it! You've written your first Java code.


  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training India . Nowadays Java has tons of job opportunities on various vertical industry.

  2. Finally I found something interesting about Java, cause everything that I saw before was a little bit complicated for me. I am only beginners in Java, and most of the time learn Java here on this nice service with best articles and tutorials.