Introduction to Java

In this tutorial, we’ll give you a short introduction to Java to help you get started with Java technology quickly.

Sun Microsystems released the first version of Java in 1995 as a programming language for developing applications and a computing platform that hosts Java applications. Recently many more languages have been supported to run on Java platforms such as JRuby, Groovy, and Jython. Currently, Java runs on millions of PC worldwide and billions of devices, including TV and mobile devices.

To have a brief overview of what is Java; check it out a short Java introduction video on Java.com

Java is a programming language

Java is a general-purpose, concurrent, class-based, and object-oriented programming language. Java borrows much syntax from C/C++ and simplifies some of them to help developers build applications more effectively. If you are a C/C++ programmer, you can find many similarities between Java and C/C++, and you can learn Java very quickly.

Java was designed to be portable. Once Java code is written and compiled into Java bytecode, it can run on any platform e.g., Windows, Linux,  Mac OS X, Android that supports Java,  without recompiling the source code.  This is known as the “Write Once, Run Everywhere” feature of Java.

Java is more robust than C/C++. By hiding some complexities features of C/C++, Java allows you to develop more scalable applications, less venerable to crash than C/C++ with ease.

Java developers write the Java code in plain text files with extension .java. The Java compiler compiles these Java source code files into execution code, which is known as Java bytecode, which is stored in .class files. Java bytecode files can run on any platform that supports Java or in other words, has Java Virtual Machine installed.

Java is a computing platform

Java is a computing platform that executes Java-based applications.  Java platform consists of Java Virtual Machine (JVM) and execution environment.

Java virtual machine (JVM) is an important component of the Java platform. The JVM provides a runtime environment in which Java applications can be executed.

Java execution environment is also known as Java Runtime Environment or JRE. JRE consists of Java Virtual Machine (JVM) and Java Application Programming Interface (API). The JRE executes the Java .class files.  It emulates the JVM instructions by compiling the bytecode using a just-in-time compiler (JIT) e.g., Hotspot compiler. There are ahead-of-time compilers available to allow Java developers to pre-compile the .class files into the native code of the targeted platform to achieve a higher speed of execution for Java applications.

In this tutorial, we have introduced you to some important concepts of Java technology to help you get started with Java as quickly as possible.