
Java is now more than 30 years old and still runs a huge share of the world's backend systems, Android apps and banking software. Knowing its history is not just trivia for a quiz. When you join a company, you will often find projects still on Java 8 or Java 11, and it helps a lot to know which features exist in which version and why the language looks the way it does.
This post covers where Java came from, the ideas it was built on, the releases that changed how we write code, and how the release schedule works today. At the end there is a small program that shows the same task written in the style of different Java versions.
The beginning: Oak and the Green Project
In 1991, a small team at Sun Microsystems started an internal effort called the Green Project. The team included James Gosling, Mike Sheridan and Patrick Naughton. Their target was not the web, which barely existed for the public then. They wanted software for consumer electronics such as set-top boxes and handheld devices.
Those devices used many different chips, and C++ code had to be rebuilt for each one. Gosling designed a language that compiled to an intermediate form and ran on a small virtual machine on each device. He named it Oak, reportedly after a tree outside his office. James Gosling is the person usually called the father of Java.
The consumer electronics market did not take off for Sun, but the internet did. The team realised that a portable, safe language was exactly what web browsers needed for running code downloaded from strangers. The name Oak was already taken as a trademark, so the language was renamed Java. Sun announced it publicly in May 1995, and JDK 1.0 was released in January 1996.
The design goals
Sun described the goals of the language in a white paper. In plain words, Java was meant to be:
- Simple, object-oriented and familiar, with syntax close to C and C++ so that existing programmers could pick it up, but without pointer arithmetic or manual memory management.
- Reliable and secure, with strong type checking, garbage collection and a bytecode verifier, so a bad program could not corrupt memory.
- Architecture-neutral and portable, the famous "write once, run anywhere". You compile to bytecode once, and any machine with a JVM can run it.
- High performance, which later came from just-in-time compilation in the HotSpot JVM.
- Interpreted, threaded and dynamic, with threads built into the language and classes loaded at run time.
Releases that changed how we write Java
| Version | Year | What it brought |
|---|---|---|
| JDK 1.0 | 1996 | The first public release: core language, applets, AWT |
| JDK 1.1 | 1997 | Inner classes, JDBC for databases, reflection |
| J2SE 1.2 | 1998 | Collections framework, Swing, the "Java 2" branding |
| J2SE 1.4 | 2002 | assert, regular expressions, NIO |
| J2SE 5.0 | 2004 | Generics, enhanced for loop, autoboxing, enums, annotations |
| Java SE 7 | 2011 | try-with-resources, the diamond operator, strings in switch |
| Java SE 8 | 2014 | Lambdas, streams, the new java.time date API |
| Java SE 9 | 2017 | The module system, JShell |
| Java SE 10 | 2018 | var for local variables, and the start of six-month releases |
| Java SE 17 | 2021 | Long-term support release with records and sealed classes |
| Java SE 21 | 2023 | Long-term support release with virtual threads and pattern matching for switch |
| Java SE 25 | 2025 | Long-term support release; compact source files and instance main methods became standard |
Java 5 and Java 8 are the two biggest jumps. If you open a codebase and see raw List types with casts everywhere, it was probably written before 2004. If there are no lambdas or streams, it may be pre-2014 code or written by people who learned before then.
Sun, Oracle and open source
In 2006 Sun announced that it would release Java under the GPL, and the OpenJDK project became the open-source home of the platform. Sun itself struggled financially in the years after the dot-com crash, and Oracle completed its acquisition of Sun in January 2010. Oracle now leads Java's development, while other vendors also contribute to OpenJDK and ship free builds of it.
How releases work now
Until Java 9, a new version came out every few years, and big features were often delayed while waiting for each other. From Java 10 in March 2018, the platform moved to a fixed schedule: a new feature release every six months, in March and September. Whatever is ready ships, and the rest waits for the next train.
Not every release is meant for production. Every few versions one is marked long-term support (LTS) and gets updates for years. Java 11 (2018) and 17 (2021) were LTS, and since then an LTS has come every two years. As of October 2026, the current LTS releases are Java 21 and Java 25. For a new project, pick the latest LTS your tools support.
The same task in different eras
This program prints a list in Java 1.4 style, then Java 5 style, then uses Java 8 streams, a Java 16 record and Java 10 var. It compiles on any modern JDK. I ran it on Java 21.
import java.util.*;
import java.util.stream.*;
public class Evolution {
// Java 16+: a record replaces a whole class of boilerplate
record Student(String name, int marks) {}
public static void main(String[] args) {
// Java 1.4 style: raw List, casts, index loop
List oldList = new ArrayList();
oldList.add("Riya");
oldList.add("Aman");
for (int i = 0; i < oldList.size(); i++) {
String s = (String) oldList.get(i);
System.out.println("1.4 style: " + s);
}
// Java 5 style: generics and the for-each loop
List<String> names = new ArrayList<String>();
names.add("Riya");
names.add("Aman");
for (String s : names) {
System.out.println("Java 5 style: " + s);
}
// Java 8 style: lambdas and streams
List<Student> students = List.of(new Student("Riya", 91), new Student("Aman", 78),
new Student("Kabir", 85));
String toppers = students.stream()
.filter(st -> st.marks() > 80)
.map(Student::name)
.sorted()
.collect(Collectors.joining(", "));
System.out.println("Scored above 80: " + toppers);
// Java 10+: var for local variables
var count = students.size();
System.out.println("Students: " + count);
}
}
1.4 style: Riya
1.4 style: Aman
Java 5 style: Riya
Java 5 style: Aman
Scored above 80: Kabir, Riya
Students: 3
Notice that the compiler also printed a warning about "unchecked or unsafe operations". That warning comes from the raw List in the first block. Old code still compiles, which is why Java projects can live for decades, but the compiler reminds you that generics would be safer.
Common mistakes
- Confusing Java and JavaScript. They share a name for marketing reasons in 1995 and nothing else. Different languages, different runtimes.
- Mixing up version names. Java 5 is the same as version 1.5, and Java 8 is 1.8. From Java 9 onwards the "1." prefix was dropped.
- Assuming every new release is LTS. Only some are. Java 22, 23 and 24 were short-lived feature releases.
Related: Welcome to Java is a gentle first program, and the Java OOP MCQs help you test what you know.
Tip: try to solve the problem yourself before reading the solution. Use the code as a reference to check your approach, and make sure you understand why it works.
Comments
Post a Comment