Java Hello World Sample

Do you remember the first Java program you write when first learning Java. You may have been in a intro to Java course in college or perhaps picked up a fundamentals of Java programming book at your local book store. I think most if not all Java programmers will answer with “Hello World”.

Ever wonder why the Java Hello World is such a common starting point? It’s a very simple way to start the programming process in Java. Hello World program for the most part contains a single line of code, a call to System.out.println().

In the most basic environment, you need to perform the following three steps to write a Java program.

  • Install Java JDK library
  • Create Simple Java Source File
  • Define a Class
  • Define main
  • Compile Source File Into Executable


Java Hello World Sample Code

Traditionally the Java Hello World is the most basic and simple program Java coders will write.

package com.jcd.java.tutorials;

public class JavaHelloWorld 
{

	public static void main(String[] args) 
	{
		System.out.println("Java Code Depot Says Hello You Crazy World!!!");
	}

}


I guess there is some nostalgia in looking back at your first Java program and comparing that to the complex Java applications we are writing these days. The Hello World program as simple as it is, is still the basic building blocks of Java programming.


Java References:

  1. Java Language Basics Samples

Add a Comment

Your email address will not be published. Required fields are marked *