Introduction to Java — History, Features & How It Works
Welcome to the very first chapter of our Core Java Tutorial Series. If you’ve never written a single line of code, you’re in the right place. By the end of this chapter, you’ll understand what Java is, why it matters, and how it works at a high level.
What Is Java?
Java is a high-level, general-purpose programming language — meaning it’s designed to be readable by humans (unlike machine code) and can build almost any kind of software.
Think of a programming language like a set of instructions you write to tell a computer what to do. Just like you might follow a recipe to bake a cake, a computer follows your Java code to perform tasks — from calculating numbers to serving a website to millions of users.
Java was created with one revolutionary idea: Write Once, Run Anywhere (WORA). You write your code once, and it can run on any device — Windows, Mac, Linux, or even your phone — without modification.
A Brief History of Java
The Green Project (1991)
Java’s story begins at Sun Microsystems in 1991. A small team led by James Gosling started a project called “Green” — originally aimed at creating software for consumer electronics like set-top boxes and interactive TVs.
They needed a language that was:
- Simple enough for small devices
- Portable across different hardware
- Reliable enough for consumer products
From Oak to Java (1991–1995)
The language was originally called Oak (named after a tree outside Gosling’s office window). When they discovered the name was already trademarked, the team renamed it to Java — inspired by Java coffee from Indonesia.
Java 1.0 — The Public Launch (1996)
Sun Microsystems officially released Java 1.0 in January 1996. Its revolutionary promise was simple: “Write Once, Run Anywhere.” The timing was perfect — the internet was exploding, and Java applets could run inside web browsers.
Major Java Milestones
| Year | Version | Key Features |
|---|---|---|
| 1996 | Java 1.0 | Initial release, applets |
| 2004 | Java 5 | Generics, enhanced for loop, autoboxing |
| 2014 | Java 8 | Lambda expressions, Stream API, java.time |
| 2017 | Java 9 | Modules (Project Jigsaw) |
| 2018 | Java 11 (LTS) | var in lambdas, HTTP Client, removed JavaFX |
| 2021 | Java 17 (LTS) | Sealed classes, pattern matching |
| 2023 | Java 21 (LTS) | Virtual threads, record patterns, sequenced collections |
LTS stands for Long-Term Support — these versions receive updates and security patches for years. For learning, always use the latest LTS version (Java 21).
Oracle Acquires Sun (2010)
Oracle Corporation acquired Sun Microsystems in 2010 and has maintained Java ever since. Java now follows a 6-month release cycle — a new version every March and September.
Java Editions
Java comes in multiple editions, each targeting a different domain:
| Edition | Full Name | Use Case |
|---|---|---|
| Java SE | Standard Edition | Core language, desktop apps, CLI tools |
| Java EE (Jakarta EE) | Enterprise Edition | Web apps, APIs, enterprise servers |
| Java ME | Micro Edition | Mobile and embedded devices |
| Android | (Based on Java SE) | Android mobile applications |
In this tutorial series, we focus on Java SE — it’s the foundation for everything else.
How Java Works — Compile Once, Run Anywhere
Most programming languages fall into two categories:
- Compiled languages (C, C++, Rust): Source code is compiled directly to machine code for a specific OS. Fast, but not portable.
- Interpreted languages (Python, JavaScript): Code is interpreted line-by-line at runtime. Portable, but slower.
Java does both — and that’s what makes it special.
The Java Compilation Process
┌──────────────┐ javac ┌──────────────┐ JVM ┌──────────────┐
│ Hello.java │ ──────────────→│ Hello.class │ ──────────────→│ Output: │
│ (source code)│ (compiler) │ (bytecode) │ (interpreter) │ Hello, World │
└──────────────┘ └──────────────┘ └──────────────┘
Here’s what happens step by step:
- You write Java source code in a
.javafile - The compiler (
javac) converts it to bytecode — a.classfile - The JVM (Java Virtual Machine) reads the bytecode and executes it on your OS
What Is Bytecode?
Bytecode is an intermediate language — it’s neither human-readable source code nor machine code for a specific CPU. It’s a set of instructions that any JVM can understand.
This is the magic: the bytecode is the same regardless of your OS. Each operating system has its own JVM implementation that translates bytecode into native machine instructions.
┌─────────────────┐
│ Hello.class │
│ (bytecode) │
└────────┬────────┘
│
┌──────────────┼──────────────┐
▼ ▼ ▼
┌────────────┐ ┌────────────┐ ┌────────────┐
│ Windows JVM│ │ Linux JVM │ │ macOS JVM │
└─────┬──────┘ └─────┬──────┘ └─────┬──────┘
▼ ▼ ▼
Windows OS Linux OS macOS
JDK vs JRE vs JVM
These three terms come up constantly in Java:
| Component | What It Is | Analogy |
|---|---|---|
| JVM (Java Virtual Machine) | Executes bytecode | The engine that runs Java programs |
| JRE (Java Runtime Environment) | JVM + standard libraries | The engine + the fuel |
| JDK (Java Development Kit) | JRE + compiler + dev tools | The whole garage — everything you need to build and run |
As a developer, you install the JDK. Users who just run Java programs need the JRE.
Java vs JavaScript — Completely Different Languages
This is one of the most common beginner confusions. Despite the similar names, Java and JavaScript are completely different languages:
| Feature | Java | JavaScript |
|---|---|---|
| Type | Compiled to bytecode | Interpreted |
| Typing | Statically typed | Dynamically typed |
| Runs on | JVM (any OS) | Browser / Node.js |
| Primary use | Backend, Android, enterprise | Web frontend, Node.js backend |
| Created by | James Gosling (Sun, 1995) | Brendan Eich (Netscape, 1995) |
The naming overlap was a marketing decision by Netscape in the 1990s — JavaScript was originally called “Mocha” and then “LiveScript.”
What Can You Build with Java?
Java is everywhere. Here’s a small sample:
| Domain | Examples |
|---|---|
| Android Apps | Most Android apps are written in Java (or Kotlin, which runs on JVM) |
| Enterprise Backend | Banking systems, insurance platforms, government services |
| Web Applications | Spring Boot REST APIs, e-commerce platforms |
| Big Data | Apache Hadoop, Apache Spark, Apache Kafka |
| Cloud Services | AWS Lambda (Java runtime), Azure Functions |
| Scientific Computing | MATLAB integration, bioinformatics tools |
| Game Development | Minecraft was written in Java |
| DevOps Tools | Jenkins, Elasticsearch, Gradle |
Companies That Use Java
Google, Amazon, Netflix, Uber, LinkedIn, Twitter (now X), Airbnb, Spotify, eBay, and virtually every major bank and financial institution.
Why Java Is Still the #1 Enterprise Language
In a world with hundreds of programming languages, Java continues to dominate for several reasons:
- 35+ billion devices run Java worldwide
- #1 language in enterprise backend development
- 6-month release cycle keeps the language modern (virtual threads, records, pattern matching)
- Massive ecosystem — Spring Boot, Hibernate, Maven, Gradle, JUnit, Kafka
- Backward compatibility — code written in Java 8 still runs on Java 21
- Performance — JIT (Just-In-Time) compilation makes Java surprisingly fast
- Community — millions of developers, thousands of libraries, decades of Stack Overflow answers
Key Features of Java
Let’s summarize Java’s defining characteristics:
Platform Independence (WORA)
Write code once, compile to bytecode, run on any OS with a JVM.
Object-Oriented
Java organizes code into classes and objects — you’ll learn this thoroughly in Module 2: OOP.
Strongly Typed
Every variable must have a declared type (int, String, boolean). This catches bugs at compile time.
Automatic Memory Management
Java’s garbage collector automatically frees memory you’re no longer using — no manual malloc/free like in C.
Multi-threaded
Built-in support for running multiple tasks simultaneously. Java 21 introduced virtual threads for lightweight concurrency.
Secure
Java’s security model includes bytecode verification, class loaders, and sandboxing.
Robust
Strong type checking, exception handling, and no pointer arithmetic (unlike C/C++) make Java programs more reliable.
Summary
| Concept | Key Point |
|---|---|
| What is Java? | High-level, general-purpose, object-oriented language |
| Created by | James Gosling at Sun Microsystems, 1995 |
| Key philosophy | Write Once, Run Anywhere (WORA) |
| How it works | Source → Bytecode → JVM executes |
| Current version | Java 21 (LTS) |
| Maintained by | Oracle Corporation |
| Primary uses | Enterprise backends, Android, cloud, big data |
What’s Next?
Now that you understand what Java is and why it matters, let’s explore why Java is the right language to learn →
Frequently Asked Questions
Is Java free?
Yes. OpenJDK is free and open-source. Oracle JDK has commercial licensing for production use, but OpenJDK (from Adoptium/Eclipse Temurin) is completely free.
Is Java hard to learn?
Java is more verbose than Python, but its strict rules actually make it easier to understand what’s happening. If you follow this tutorial series chapter by chapter, you’ll find it very approachable.
Do I need to know math to learn Java?
Basic arithmetic is enough. You don’t need calculus, linear algebra, or statistics to learn Java programming.
Is Java dying?
No. Java consistently ranks in the top 3 programming languages worldwide. With features like virtual threads and modern syntax improvements, Java is more relevant than ever.