Interviewers ask "what's new in Java X?" and real codebases run on the LTS versions. What arrived when:
| Version | Year | Headline features |
|---|---|---|
| 8 (LTS) | 2014 | lambdas, functional interfaces, method references, streams, Optional, default methods, new date/time API (java.time) |
| 9 | 2017 | List.of/Set.of/Map.of, modules (JPMS), JShell (an interactive Java prompt), private interface methods |
| 10 | 2018 | var |
| 11 (LTS) | 2018 | String isBlank/strip/repeat/lines, standard HTTP client, java File.java single-file run |
| 14 | 2020 | switch expressions, helpful NullPointerException messages |
| 15 | 2020 | text blocks |
| 16 | 2021 | records, pattern matching for instanceof, Stream.toList() |
| 17 (LTS) | 2021 | sealed classes |
| 21 (LTS) | 2023 | pattern matching for switch, record patterns, virtual threads (Concurrency), sequenced collections |
| 25 (LTS) | 2025 | the newest LTS; refinements such as flexible constructor bodies and compact source files |