Latest web development tutorials

Java Tutorial


Java was developed by Sun Microsystems company in May 1995 launched the high-level programming language.

Java can run on multiple platforms such as Windows, Mac OS, and many other versions of UNIX systems.

This tutorial simple example will give you a better understanding of JAVA programming language.

My first JAVA program

Below we to show through a simple example of Java programming, create a file (filenames consistent with the class name), as follows:


public class HelloWorld { public static void main (String [] Args) { .. System out println ( "Hello World");} }

Running instance »

Run the above example, the output results are as follows:

$ javac
$ java HelloWorld
Hello World

Run Analysis:

Above we used two command javac and java.

javac command is used to java source files compiled into bytecode class files, such as: javac

After running the javac command, if successfully compiled without errors, then there will be a HelloWorld.class file.

java command to run the class bytecode files, such as: java HelloWorld.

NOTE: java command do not add .class behind.

Gif presentation:

Start learning JAVA programming