Your browser has JavaScript turned off. This page is best viewed with Javascript enabled. Certain functions on this site will not work, and some style sheets will not load. Check your browser preferences to enable JavaScript.

Teach Yourself Java

What is Java?

Good question. Java is a high-level, object-oriented computer programming language. It is an extention of the C++ programming language. Java has been hailed for its ability to be run across multiple platforms (can run on any kind of computer) and for providing an easy way to make programs for the Internet. The reason for this is that when you compile Java code, it is made into bytecode. When you compile a program in other languages, it is made into the machine-level code that is needed to run the program. However, in Java, the Java Virtual Machine (JVM) contains all of the machine-level code. The JVM must be installed on your computer before you can run Java programs (the specific version of JVM depends on your operating system). Since Java programs are stored as bytecode rather than machine-code, Java program files are very small, making them easy to download from the Internet.

Java bytecode make "write once, run anywhere" possible. You can compile your Java program on any platform. The bytecode can then be run on any implementation of the JVM. That means that the same program written in Java can run on Windows, UNIX, or on a Mac.


History of Java

Java was created by Sun Microsystems in 1991; it took 18 months to write. At that time, it was called "Oak". It was created for internal use at Sun because they had many different computers, and they wanted a language that could work on all of them. In 1995 "Oak" was released to the general public under the name that we know today - "Java".

The origin of the name "Java" is kind of a funny story. While the people at Sun Microsystems were developing their new language, "Oak", they found out that some other programmers happened to be creating a programming language that was also called Oak. So they decided to change the name, but first they wanted to take a break. Someone drank some coffee, came back into the room, and suggested the name Java. The name has stuck ever since.