Welcome to the Java Evolution repository, where we document the journey of Java from version 8 through 21, covering all the major features and changes introduced in each version. This repository aims to serve as a comprehensive guide for developers at all levels to understand the evolution of Java, enabling them to make the most of the language's capabilities in their projects.
Our goal is to provide a detailed exploration of each feature introduced in Java from version 8 onwards, including examples and explanations to help Java developers grasp the concepts and apply them in practice.
- Version Directories: The repository is organized into directories named after each Java version (e.g., Java_8, Java_9, etc.), containing detailed documentation and examples for the features introduced in that version.
- README Files: Each version directory includes a README.md with an overview of the key features introduced in that version, along with links to detailed explanations or code examples where applicable.
- Feature Documentation: Complex features have their own Markdown files or code examples within the relevant version directory, providing a deeper dive into their usage and benefits.
- To explore the features introduced in a specific version of Java, navigate to the corresponding version directory.
- For an overview of the features in each version, refer to the README.md files within each version directory.
- For detailed explanations and examples of specific features, look for additional Markdown files or code examples within the version directories.
We welcome contributions from the community! Whether you'd like to add examples, improve explanations, or update the documentation for newer Java versions, your input is valuable. Please refer to the CONTRIBUTING.md file for guidelines on how to contribute effectively.
Below is a brief overview of the key features introduced in Java from version 8 to 21. This serves as a starting point for the detailed documentation you'll find in this repository.
Lambda Expressions, Streams API, Date and Time API, Default Methods, Type Annotations
Module System (Project Jigsaw), JShell, Private Interface Methods, Immutable Collections
Local-Variable Type Inference (var), Application Class-Data Sharing
HttpClient API (Standard), New String Methods, Local-Variable Syntax for Lambda Parameters
Switch Expressions (Preview), Compact Number Formatting
Text Blocks (Preview), Switch Expressions (Standard)
Records (Preview), Pattern Matching for instanceof (Preview), Helpful NullPointerExceptions
Sealed Classes (Preview), Text Blocks (Standard), Pattern Matching for instanceof (Second Preview)
Records (Standard), Pattern Matching for instanceof (Standard), Sealed Classes (Second Preview)
Sealed Classes (Standard), Pattern Matching for Switch (Preview), New macOS Rendering Pipeline
Simple Web Server (Incubator), Code Snippets in Java API Documentation
Virtual Threads (Preview), Structured Concurrency (Incubator), Pattern Matching for Switch (Second Preview)
Record Patterns (Preview), Pattern Matching for Switch (Standard)
(Features to be documented upon release)
For more in-depth information and the latest updates on Java, please refer to the official Java documentation and JDK Enhancement Proposals (JEPs).
Java continues to evolve, and so will this repository. We aim to regularly update the documentation with the latest features and improvements. Your contributions and feedback are essential to keeping this resource valuable and up-to-date.