Hello World Program in Java
The following is the most basic example of a Java program. You need the Java Development Kit installed in order to compile source code you write. If you don't have JDK installed on your computer, go here and click the link for your operating system for directions on how to install it.
The following code contains many comments. Anything after two slashes // is ignored by the compiler. Programmers use comments to help themselves and each other keep track of what their code is meant to do.