Complete History of Java | Every New Feature Introduced in Every Version

Amandeep Singh
8 min readAug 22, 2023

--

Here is a list of all the new features introduced in every Java release:

JDK 1.0 (1996)

  • Operators: The basic mathematical and logical operators that can be used in Java programs.
  • Control flow statements: Statements that control the flow of execution of a Java program.
  • Classes: The basic building blocks of Java programs.
  • Objects: Instances of classes.
  • Methods: The code that is executed when an object’s method is called.
  • Arrays: Collections of objects.
  • Exceptions: Errors that can occur during the execution of a Java program.
https://blog.eduonix.com/

JDK 1.1 (1997)

  • Garbage collection: Automatic memory management in Java.
  • Threads: The ability to run multiple tasks simultaneously in a Java program.
  • Swing GUI toolkit: A graphical user interface toolkit for Java.

J2SE 1.2 (1998)

  • Regular expressions: Pattern matching for text strings.
  • Internationalization support: The ability to internationalize Java programs for different languages and cultures.
  • JavaBeans component model: A component-based development model for Java.

J2SE 1.3 (2000)

  • The HotSpot JVM: A high-performance Java Virtual Machine.
  • RMI support for CORBA: The ability to call Java methods from CORBA objects and vice versa.
  • The Java Naming and Directory Interface (JNDI): A directory service for Java.

J2SE 1.4 (2002)

  • Improved I/O support: Support for reading and writing files, sockets, and other I/O devices.
  • XML parsing: The ability to parse XML documents in Java.
  • The Logging API: An API for logging messages in Java programs.

Java 5 (2004)

  • Generics: Type safety for collections and other data structures.
  • Annotations: Metadata that can be attached to Java code.
  • The try-with-resources statement: A statement that automatically closes resources when they are no longer needed.

Java 6 (2006)

  • The JavaFX platform: A graphical user interface toolkit for Java.
  • The nashorn JavaScript engine: A JavaScript engine for Java.
  • The JMX remote management API: An API for managing Java applications remotely.

Java 7 (2011)

  • The diamond operator: Shorthand syntax for creating a generic collection.
  • The switch statement with multiple values: The ability to have multiple case labels in a switch statement.
  • The StringBuilder.append method: A method for appending a value to a StringBuilder object.

Java 8 (2014)

  • Lambda expressions: Anonymous functions that can be used to pass code as arguments.
  • Streams: A way of processing data in a sequential or parallel manner.
  • The CompletableFuture class: A class for managing asynchronous tasks.

Java 9 (2017)

  • Modules: A way of packaging and deploying Java code.
  • Text blocks: Multi-line strings.
  • The ZGC garbage collector: A garbage collector that is designed for low latency applications.

Java 10 (2018)

  • The preview of the HTTP client API: A simplified API for making HTTP requests.
  • The removal of the Nashorn JavaScript engine: The Nashorn JavaScript engine is no longer included in the Java SE 10 JDK.

Java 11 (2018)

  • The preview of the sealed classes and records: Sealed classes and records are new language features that are not yet fully implemented.
  • The removal of the Java EE APIs: The Java EE APIs are no longer included in the Java SE 11 JDK.

Java 12 (2019)

  • The preview of the switch expression: The switch expression is a new language feature that is not yet fully implemented.
  • The helpful NullPointerExceptions: NullPointerExceptions are now more informative and helpful.
  • The pattern matching for instanceof: The instanceof operator can now be used with pattern matching.

Java 13 (2019)

  • The sealed classes and records: Sealed classes and records are now fully implemented.
  • The preview of the Foreign Function & Memory API: The Foreign Function & Memory

Java 14 (2020)

  • Switch expression (preview): The switch expression is a new language feature that allows you to write concise and readable switch statements.
  • Records (standard): Records are a new data type that make it easier to create immutable data classes.
  • Text blocks (preview): Text blocks are a new way to write multi-line strings.
  • Pattern matching for instanceof (standard): Pattern matching can now be used with the instanceof operator.
  • HTTP client API (preview): A simplified API for making HTTP requests.
  • ZGC garbage collector (standard): A garbage collector that is designed for low latency applications.

Java 15 (2020)

  • Preview of the HTTP client API: A simplified API for making HTTP requests.
  • ZGC garbage collector (standard): A garbage collector that is designed for low latency applications.
  • Removal of the JRE installer: The JRE installer is no longer included in the Java 15 JDK.
  • Text blocks (standard): Text blocks are a new way to write multi-line strings.
  • Pattern matching for instanceof (standard): Pattern matching can now be used with the instanceof operator.

Java 16 (2021)

  • Foreign-memory access API (incubator): This API allows Java programs to access memory that is not managed by the Java Virtual Machine (JVM). This can be useful for applications that need to access low-level hardware or other resources.
  • Pattern matching for switch (standard): Pattern matching can now be used with the switch statement. This allows you to write more concise and readable code when switching on the value of an expression.
  • Instanceof pattern (standard): The instanceof pattern can now be used with pattern matching. This allows you to write more concise and readable code when checking the type of an object.
  • Text blocks (standard): Text blocks are now a standard feature of Java. This means that you can use them in all Java code, not just in preview features.

Java 17 (2021)

  • Removal of the preview features from Java 14 and 15: The switch expression, text blocks, and pattern matching for instanceof are now standard features of Java. The HTTP client API is still in preview.
  • Record patterns (standard): Record patterns are a new way to use pattern matching with records. This can be useful for writing more concise and readable code when working with records.
  • Scoped values (preview): Scoped values are a new way to create local variables that are scoped to a specific block of code. This can be useful for preventing name conflicts and for improving the readability of code.
  • Pattern matching for switch (fourth preview): Pattern matching can now be used with the switch statement. This allows you to write more concise and readable code when switching on the value of an expression.
  • Internet-address resolution SPI (preview): This SPI allows Java applications to provide their own implementation of internet-address resolution. This can be useful for applications that need to resolve internet addresses in a specific way.

Java 18 (2022)

  • Simple web server: A simple web server that can serve static files.
  • Code snippets in Java API documentation: Code snippets can now be included in Java API documentation. This can be useful for developers who are learning how to use the API.
  • Reimplementation of core reflection with method handles: The core reflection API has been reimplemented using method handles. This makes the API more efficient and easier to use.
  • Deprecated finalization for removal: Finalization is a process that is used to clean up resources when an object is garbage collected. Finalization is deprecated in Java 18 and will be removed in a future release.
  • UTF-8 by default: The default character encoding for Java is now UTF-8. This makes it easier to support internationalized applications.

Java 19 (2022)

  • Structured concurrency: Structured concurrency is a new way to write concurrent code that is more concise, readable, and easier to reason about. It is based on the concept of tasks, which are lightweight units of work that can be executed concurrently.
  • Virtual threads: Virtual threads are a new way to implement threads that are more efficient and scalable than traditional threads. They are implemented using a technique called cooperative multitasking, which allows multiple threads to share the same processor without the need for context switching.
  • Pattern matching for switch (fifth preview): Pattern matching can now be used with the switch statement. This allows you to write more concise and readable code when switching on the value of an expression.
  • Foreign function & memory API (third incubator): This API allows Java programs to access functions and memory that are not managed by the Java Virtual Machine (JVM). This can be useful for applications that need to access low-level hardware or other resources.
  • Internet-address resolution SPI (second preview): This SPI allows Java applications to provide their own implementation of internet-address resolution. This can be useful for applications that need to resolve internet addresses in a specific way.

Java 20 (2023)

  • Structured concurrency (preview): Structured concurrency is a new way to manage concurrent tasks in Java. It provides a high-level abstraction for creating and managing concurrent tasks, which can make it easier to write correct and efficient concurrent code.
  • Virtual threads (preview): Virtual threads are a new way to implement concurrency in Java. They are lightweight threads that can be created and destroyed more easily than traditional threads. This can make them a good choice for applications that need to create a large number of concurrent tasks.
  • Scoped values (standard): Scoped values are a new way to create local variables that are scoped to a specific block of code. This can be useful for preventing name conflicts and for improving the readability of code.
  • Pattern matching for switch (fifth preview): Pattern matching can now be used with the switch statement. This allows you to write more concise and readable code when switching on the value of an expression.
  • Foreign function and memory API (preview): This API allows Java programs to access foreign functions and memory that is not managed by the Java Virtual Machine (JVM). This can be useful for applications that need to interact with native code or other non-Java code.

Java 21 (2023)

  • Virtual threads (preview): Virtual threads are a new way to create lightweight threads that promise to dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications.
  • Sequenced Collections: Sequenced Collections introduce three new interfaces: SequencedSet, SequencedCollection, and SequencedMap. These interfaces come with additional methods that provide improved access and manipulation capabilities for collections.
  • Record Patterns: Record Patterns are a new way to use pattern matching with records. This can be useful for writing more concise and readable code when working with records.
  • Pattern Matching for Switch (fifth preview): Pattern matching can now be used with the switch statement. This allows you to write more concise and readable code when switching on the value of an expression.
  • Unnamed Classes and Instance Main Methods (preview): Unnamed classes and instance main methods are two new features that make it easier to write and test Java code.
  • Scoped Values (standard): Scoped values are a new way to create local variables that are scoped to a specific block of code. This can be useful for preventing name conflicts and for improving the readability of code.
  • Key Encapsulation Mechanism API (KEM API): The KEM API is a new API that provides a way to generate and use cryptographic keys. This can be useful for applications that need to use cryptography to secure their data.

If you want to learn Core Java from the beginning and that too without any cost, do checkout below Playlists:

Core Java

Spring Framework

Java 8

Java Interview Preparation

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Amandeep Singh
Amandeep Singh

Written by Amandeep Singh

Love Programming & Love to Share the Knowledge with Others

Responses (2)

Write a response