> Markdown version of [/videos/105-best-of-java-15-and-beyond-my-favorite-features?t=20](https://www.wearedevelopers.com/videos/105-best-of-java-15-and-beyond-my-favorite-features?t=20). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Best of Java 15 and beyond—my favorite features Tired of endless boilerplate and obscure NullPointerExceptions? Discover how Java 15 uses records, pattern matching, and multi-line text blocks to bring elegance back to your codebase. - **Speakers:** Michael Inden - **Event:** WeAreDevelopers LIVE - **Published:** January 20, 2021 - **Duration:** 45:30 - **URL:** https://www.wearedevelopers.com/videos/105-best-of-java-15-and-beyond-my-favorite-features ## Summary Java continues its evolution toward a more modern, expressive, and concise syntax, maintaining its staying power amidst rising languages like Python. By tackling longstanding pain points and introducing functional concepts, recent JDK releases significantly reduce boilerplate and increase program stability. Developers making the leap to Java 15—and utilizing enhancements originating in Java 14—will find tools built to optimize readability and eliminate frequent bug sources. Foremost among these updates are streamlined syntax improvements that directly improve daily coding tasks. The modernized `switch` expression abandons the traditional, error-prone fall-through design, enabling direct variable assignments without needing a `break` statement. Meanwhile, debugging nested objects becomes dramatically simpler with helpful NullPointerExceptions, which explicitly identify exactly which field or variable resolved to null. When defining strings, new multi-line text blocks eliminate the tedious escape sequences previously required to format embedded HTML or JSON documents. Additionally, the introduction of records fundamentally changes how developers structure data transfer objects (DTOs). By automating the generation of constructors, getters, `equals()`, `hashCode()`, and `toString()` methods, records deliver completely immutable, contract-compliant classes in a single line of code. Alongside pattern matching for `instanceof`, which removes the need for redundant type casting, these language features add elegance back into the Java ecosystem. The presentation also highlights the maturation of JShell into a capable REPL for testing code snippets and evaluating expressions on the fly. Looking forward, the ecosystem's roadmap focuses on upcoming iterations and feature projects like Project Loom for concurrency fibers and Project Valhalla for value types. As release cadences dictate the path to the next Long-Term Support (LTS) milestone, modernizing the JDK ensures Java remains highly competitive and responsive to the expectations of today’s developer community. **Keywords:** java 15 features, switch expressions, helpful nullpointerexceptions, multi-line text blocks, java records, pattern matching instanceof, jshell REPL, project loom fibers, project valhalla, long-term support release, JDK modernization, java syntax improvements, immutable DTOs, nashorn deprecation ## Chapters 1. **Overview of the Java features presentation** (00:20) — An introduction to syntax improvements and future releases in Java. 1. **Improving syntax with modern switch expressions** (02:29) — How new switch syntax eliminates fall-through errors and returns values directly. 1. **Gaining clearer context from null pointer exceptions** (10:16) — Better debugging using informative null pointer exception messages in recent releases. 1. **Managing multi-line strings easily with text blocks** (12:46) — How text blocks simplify creating and formatting complex string payloads. 1. **Defining immutable data transfer objects with records** (15:25) — Using records to auto-generate boilerplate code for compound state configurations. 1. **Simplifying casts using pattern matching and instanceof** (24:55) — Using pattern matching with instanceof to extract variables without explicit casting. 1. **Interactive coding and evaluation using improved JShell** (27:52) — Using JShell for quick syntax experimentation and evaluating dynamic Java code. 1. **Evaluating language popularity trends and modern competitors** (33:43) — A comparison of Java's standing against Python and other modern language trajectories. 1. **Upcoming features and major Oracle enhancement projects** (38:41) — Exploring packaging tools, pattern matching finals, and long-term release timeline estimations. 1. **Summarizing the path forward for Java evolution** (43:02) — Final thoughts regarding successful modernizations and the challenges of the current release cycle. ## Related Moments - [Significant performance and language features launching in Java 21](https://www.wearedevelopers.com/videos/658-beam-me-up-java-unraveling-the-warp-speed-evolution-a-journey-through-java-lts-versions-11-to-21) (from "Beam Me Up, Java! Unraveling the Warp-Speed Evolution: A Journey through Java LTS Versions 11 to 21") - [Reviewing modern Java features from version 12 to 17](https://www.wearedevelopers.com/videos/387-using-java-17-latest-features-in-real-world-projects) (from "Using Java 17 latest features in real world projects") - [Major language and productivity upgrades from Java 12 to 17](https://www.wearedevelopers.com/videos/658-beam-me-up-java-unraveling-the-warp-speed-evolution-a-journey-through-java-lts-versions-11-to-21) (from "Beam Me Up, Java! Unraveling the Warp-Speed Evolution: A Journey through Java LTS Versions 11 to 21") - [Discussing modern Java language evolution and syntax innovations](https://www.wearedevelopers.com/videos/344-what-s-new-for-developers-moving-from-java-11-to-17) (from ""What´s New for Developers Moving from Java 11 to 17?"") - [Choosing Java 17 for modern Spring Boot applications](https://www.wearedevelopers.com/videos/383-kubernetes-native-java) (from "Kubernetes Native Java") - [Migrating applications from Java 11 to Java 17](https://www.wearedevelopers.com/videos/344-what-s-new-for-developers-moving-from-java-11-to-17) (from ""What´s New for Developers Moving from Java 11 to 17?"") ## Related Articles - [Modern Java Switch Expressions](https://www.wearedevelopers.com/magazine/40-modern-java-switch-expressions) - [Modern Java Records](https://www.wearedevelopers.com/magazine/41-modern-java-records) - [Using Java 17 latest features in real world projects](https://www.wearedevelopers.com/magazine/121-using-java-17-latest-features-in-real-world-projects) - [Modern Java Text Blocks](https://www.wearedevelopers.com/magazine/43-modern-java-text-blocks) ## Related Jobs - [Senior Software Engineer](https://www.wearedevelopers.com/jobs/ext/15942-senior-software-engineer) at **GitHub** - [Senior Software Engineer (L3)](https://www.wearedevelopers.com/jobs/ext/1956800-senior-software-engineer-l3) at **Twilio** - [Principal Software Engineer](https://www.wearedevelopers.com/jobs/ext/149130-principal-software-engineer) at **Twilio** - [Senior Software Developer Java (m/w/d)](https://www.wearedevelopers.com/jobs/39654-senior-software-developer-java-m-w-d) at **Sopra Steria Custom Software Solutions GmbH** - [Software Engineer L3](https://www.wearedevelopers.com/jobs/ext/1840587-software-engineer-l3) at **Twilio** - [Senior Software Engineer, Enterprise Products](https://www.wearedevelopers.com/jobs/ext/1841248-senior-software-engineer-enterprise-products) at **GitHub**