Introduction to Java
โก Smart Summary
Introduction to Java explains a general-purpose, class-based, object-oriented programming language that doubles as a computing platform. This tutorial covers Java’s history, versions, features, core components (JDK, JVM, JRE), platform editions, and the bytecode mechanism that makes Java a true write-once, run-anywhere language.

What is Java?
Java is a general-purpose, class-based, object-oriented programming language designed for minimal implementation dependencies. It is also a computing platform for application development. Java is fast, secure, and reliable, which is why it powers software on laptops, data centers, game consoles, scientific supercomputers, cell phones, and embedded devices. As a multi-platform, network-centric language, Java remains one of the most widely adopted programming languages in the industry and is preferred by most organizations for building mission-critical projects.
What is the Java Platform?
The Java Platform is a collection of programs that helps developers create and run Java applications efficiently. It bundles an execution engine, a compiler, and a set of libraries, along with the specifications that define how they interoperate. James Gosling developed the Java platform at Sun Microsystems, and Oracle Corporation acquired it through the Sun acquisition in 2009.
This video introduces the Java platform and explains why Java is both a platform and a programming language:
Click here if the video is not accessible.
What is Java Used For?
Here are some of the most important real-world applications of Java:
- Developing Android apps.
- Building enterprise software for large organizations.
- Powering a wide range of mobile Java applications.
- Running scientific computing applications.
- Driving big data analytics pipelines.
- Programming embedded hardware devices.
- Server-side technologies such as Apache, JBoss, GlassFish, and Tomcat.
History of the Java Programming Language
Here are the important landmarks from the history of the Java language:
- The Java language was initially called OAK.
- It was originally developed for handling portable devices and set-top boxes, where OAK was a commercial failure.
- In 1995, Sun renamed the language to “Java” and refocused it to take advantage of the rapidly growing World Wide Web.
- In 2009, Oracle Corporation acquired Sun Microsystems and took ownership of three key Sun software assets: Java, MySQL, and Solaris.
Java Versions
Here is a brief history of Java versions and their release dates, updated through the most recent long-term support release:
| Java Version | Release Date |
|---|---|
| JDK Alpha and Beta | 1995 |
| JDK 1.0 | 23rd Jan 1996 |
| JDK 1.1 | 19th Feb 1997 |
| J2SE 1.2 | 8th Dec 1998 |
| J2SE 1.3 | 8th May 2000 |
| J2SE 1.4 | 6th Feb 2002 |
| J2SE 5.0 | 30th Sep 2004 |
| Java SE 6 | 11th Dec 2006 |
| Java SE 7 | 28th July 2011 |
| Java SE 8 (LTS) | 18th Mar 2014 |
| Java SE 9 | 21st Sep 2017 |
| Java SE 10 | 20th Mar 2018 |
| Java SE 11 (LTS) | 25th Sep 2018 |
| Java SE 12 | 19th Mar 2019 |
| Java SE 13 | 17th Sep 2019 |
| Java SE 14 | 17th Mar 2020 |
| Java SE 15 | 15th Sep 2020 |
| Java SE 16 | 16th Mar 2021 |
| Java SE 17 (LTS) | 14th Sep 2021 |
| Java SE 18 | 22nd Mar 2022 |
| Java SE 19 | 20th Sep 2022 |
| Java SE 20 | 21st Mar 2023 |
| Java SE 21 (LTS) | 19th Sep 2023 |
| Java SE 22 | 19th Mar 2024 |
| Java SE 23 | 17th Sep 2024 |
| Java SE 24 | 18th Mar 2025 |
| Java SE 25 (LTS) | 16th Sep 2025 |
Java Features
Here are some of the most important Java features that have kept it relevant for nearly three decades:
- It is one of the easiest object-oriented programming languages to learn.
- “Write once, run anywhere” โ code compiled on one machine runs on almost any computing platform.
- Java is platform-independent thanks to its bytecode execution model.
- It is designed from the ground up for object-oriented applications.
- It is a multithreaded language with automatic memory management (garbage collection).
- It was created for the distributed environment of the internet.
- It facilitates distributed computing because of its network-centric design.
Components of the Java Programming Language
A Java programmer writes code in a human-readable language called source code. The CPU never understands source code directly โ CPUs only run machine code, and that machine code differs across CPU families. To bridge this gap, the Java platform translates source code into a portable intermediate form. All of this happens inside three core components: the JDK, the JVM, and the JRE.
Java Development Kit (JDK)
JDK is a software development environment used to build applets and Java applications. The full form of JDK is Java Development Kit. Java developers can use it on Windows, macOS, Solaris, and Linux. JDK helps them code and run Java programs. It is possible to install more than one JDK version on the same computer.
Why Use JDK?
- JDK contains the tools required to write Java programs and a JRE to execute them.
- It includes a compiler (
javac), the Java application launcher, AppletViewer, and similar utilities. - The compiler converts code written in Java into bytecode.
- The Java application launcher opens a JRE, loads the necessary class, and executes its main method.
Java Virtual Machine (JVM)
The Java Virtual Machine (JVM) is an engine that provides a runtime environment to drive Java code or applications. It converts Java bytecode into machine language. The JVM is part of the Java Runtime Environment (JRE). In other programming languages, the compiler produces machine code for a particular system. However, the Java compiler produces code for a virtual machine known as the Java Virtual Machine.
Why JVM?
- JVM provides a platform-independent way of executing Java source code.
- It has numerous libraries, tools, and frameworks available out of the box.
- Once you compile a Java program, you can run it on any platform, which saves significant time.
- JVM ships with a JIT (Just-In-Time) compiler that converts bytecode into low-level machine language at runtime, often making it run faster than an interpreted application.
Java Runtime Environment (JRE)
JRE is a piece of software designed to run other software. It contains the class libraries, loader class, and JVM. In simple terms, if you only want to run a Java program (and not develop one), you need JRE rather than the full JDK.
Why Use JRE?
- JRE contains class libraries, the JVM, and other supporting files. It does not include developer tools such as a debugger or compiler.
- It uses important package classes including
math,swing,util,lang,awt, and runtime libraries. - If you have to run Java applets or applications, JRE must be installed on your system.
Different Types of Java Platforms
There are four distinct Java programming language platforms, each tuned to a different deployment target:
1. Java Platform, Standard Edition (Java SE): Java SE’s API offers the Java programming language’s core functionality. It defines everything from base types and objects to high-level classes used for networking, security, database access, graphical user interface (GUI) development, and XML parsing.
2. Java Platform, Enterprise Edition (Jakarta EE, formerly Java EE): The Jakarta EE platform offers an API and runtime environment for developing and running highly scalable, large-scale, multi-tiered, reliable, and secure network applications. Oracle transferred the platform to the Eclipse Foundation in 2017, which rebranded it as Jakarta EE.
3. Java Platform, Micro Edition (Java ME): The Java ME platform offers an API and a small-footprint virtual machine for running Java applications on small devices such as feature phones and embedded controllers.
4. JavaFX: JavaFX is a platform for developing rich internet applications using a lightweight user-interface API. It uses hardware-accelerated graphics and media engines that help Java take advantage of higher-performance clients, a modern look-and-feel, and high-level APIs for connecting to networked data sources.
To understand the Java programming language, we need to revisit some basic concepts of how a computer program runs commands and executes actions.
What is a PC?
A computer is an electronic device capable of performing computations. It is composed of a monitor, keyboard, mouse, and memory to store information. The most important component, however, is the PROCESSOR. The processor performs all of the thinking of the computer โ but how does it actually do that thinking? How does it understand text, images, and videos?

What is Assembly Language?
The computer is an electronic device, so it understands only electronic signals โ binary signals. A 5-volt electronic signal may represent binary number 1, while 0 volts may represent binary number 0. Your PC is continuously bombarded with these signals.
Eight bits of these signals are grouped together to interpret text, numbers, and symbols.
For example, the # symbol is identified by the computer as 10101010. Similarly, the pattern for an “add” function is represented by 10000011.
This is known as 8-bit computing. Modern processors are capable of decoding 64-bit instructions at a time. So what does this concept have to do with Java? Let us walk through an example.
Suppose you want to tell the computer to add two numbers (1 + 2) represented by some binary numbers (10000011). How do you communicate that to your computer? You use assembly language to get your code executed.
“Assembly Language is the most elementary form of software development languages.”
You issue commands in the following format. The code to add two numbers in assembly language would look like this:
- Store number 1 at memory location A.
- Store number 2 at memory location B.
- Add the contents of locations A and B.
- Store the result.
Back in the 1950s, when computers were huge and power-hungry, you would convert assembly code into corresponding machine code (1s and 0s) using mapping sheets. The code was then punched into machine cards and fed to the computer. The computer read these codes and executed the program. This was a long process โ until the ASSEMBLER arrived to automate the conversion.
What are Assembler and Compiler?
With advancements in technology, I/O devices were invented. You could type your program directly into the PC using ASSEMBLER, which converts it into corresponding machine code (110001โฆ) and feeds it to your processor. Returning to our 1 + 2 example, the assembler converts the assembly code into machine code as output.
Beyond assembly, you must also make calls to operating-system-provided functions to display the output.
The assembler alone is not enough; it also needs a COMPILER to compress long source code into smaller, optimized chunks. With higher-level software development languages, the entire assembly snippet above shrinks to a single line such as printf(“%d”, 1+2). The compiler converts your C language code into assembly code; the assembler then converts that into machine code transmitted to the processor. The most common processor used in PCs is the Intel processor.
Modern compilers often bundle the assembler so they can convert higher-level language code directly into machine code.
Now, suppose Windows runs on an Intel processor โ the combination of operating system plus processor is called a PLATFORM. The most common platform is Windows on Intel, also known as the Wintel platform. Other popular platforms include AMD, Linux, PowerPC, and macOS.
With a change in processor, the assembly instructions also change. For example:
- The “add” instruction on Intel may be called ADDITION on AMD.
- Or “Math ADD” on PowerPC.
And with a change in operating system, the level and nature of OS-level calls also change.
As a developer, you want your software to work on every platform to maximize reach. That means you would have to buy separate compilers that convert your printf command into the native machine code for every target.
Compilers are expensive, and there is always a risk of compatibility issues across operating systems. Buying and installing a separate compiler for every OS-processor combination is not practical. So what is the alternative? Enter the Java language.
How Does the Java Virtual Machine Work?
By using the Java Virtual Machine, this problem can be solved. But how does it work across different processors and operating systems? Let us walk through it step by step.
Step 1) The code to display the addition of two numbers โ System.out.println(1+2) โ is saved as a .java file.
Step 2) Using the Java compiler (javac), the code is converted into intermediate code called bytecode. The output is a .class file.
Step 3) This bytecode is not understood by any physical platform, only by a virtual platform called the Java Virtual Machine.
Step 4) The JVM resides in the RAM of your operating system. When the JVM is fed this bytecode, it identifies the platform it is running on and converts the bytecode into the native machine code on the fly.
While working on your PC or browsing the web, whenever you see Java-related icons, you can be sure the JVM is loaded into your RAM. What makes Java attractive is that compiled code can run not only on every PC platform but also on mobiles and other electronic gadgets that support Java.
“Java is a programming language as well as a platform.”
How is Java Platform Independent?
Unlike a C compiler, the Java compiler does not produce native executable code for a particular machine. Instead, Java produces a unique intermediate format called bytecode. The bytecode executes according to the rules laid out in the JVM specification, which is why Java is a platform-independent language.
Bytecode is understandable by any JVM installed on any operating system. In short, Java source code can run on every modern operating system without recompilation, which is the foundation of Java’s “write once, run anywhere” promise.








