Tagged articles
switch expressions
13 articles · Page 1 of 1
Java 27's preview feature extends switch expressions to all primitive types (long, float, double, boolean) and adds pattern matching with 'when' guards, enabling concise range-based business rules instead of if-else chains, though it remains a preview feature requiring explicit enablement.
Java 27backend developmentbusiness rules
0 likes · 11 min read

From Java 9 to 17 the language adds text blocks, switch expressions, helpful NullPointerExceptions, records and sealed classes, each illustrated with real‑world code, pitfalls and best‑practice tips that dramatically cut boilerplate, prevent bugs like missing breaks, and make data‑centric code far more concise.
Helpful NPEJavaRecords
0 likes · 16 min read

This article explores Java 17’s long‑term support release, highlighting new language features such as records, sealed classes, pattern matching, text blocks, var, enhanced switch expressions, and other practical improvements that simplify code, boost readability, and increase performance.
JDK 17RecordsSealed Classes
0 likes · 13 min read

The article walks through the evolution from Java 8 to Java 21, comparing preview and standard features such as pattern‑matching instanceof, switch expressions, text blocks, the new HttpClient API, var type inference, virtual threads, records, immutable collections, improved try‑with‑resources, sequenced collections, and garbage‑collector enhancements, illustrating each with concrete code examples and practical recommendations.
JavaJava 21Text Blocks
0 likes · 16 min read

This article explores the powerful new features introduced in JDK 17—including records, sealed classes, pattern matching, enhanced switch expressions, text blocks, and the ZGC garbage collector—showing how they simplify code, improve readability, and boost performance for modern Java development.
JDK 17JavaRecords
0 likes · 10 min read

This article explores the most impactful JDK 17 enhancements—including records, sealed classes, pattern matching, text blocks, improved switch expressions, var type inference, and advanced Stream API features—showing how they simplify Java code, boost readability, and increase performance for developers transitioning from older versions.
JDK 17JavaRecords
0 likes · 14 min read


JavaEdgeJul 14, 2024 · Backend Development
This article walks through the sixteen JDK 14 JEPs, focusing on JEP 305’s instanceof pattern matching, JEP 361’s switch expressions, and JEP 368’s text blocks, providing design motivations, code comparisons, step‑by‑step usage, and practical tips for modern Java development.
JDK 14JEPJava
0 likes · 18 min read

This article introduces the key enhancements in JDK 17—including improved NullPointerException messages, Metaspace reclamation, new garbage collectors, and language upgrades such as pattern‑matching instanceof, records, sealed classes, switch expressions, and text blocks—accompanied by practical code demonstrations.
JDK 17RecordsSealed Classes
0 likes · 10 min read

This article reviews the most important Java language enhancements from version 9 through 16, covering private interface methods, diamond operators for anonymous classes, var type inference, improved try‑with‑resources, switch expressions, text blocks, records, refined NullPointerException messages, foreign memory access, sealed classes, and the new jpackage tool.
Java versionsRecordsSealed Classes
0 likes · 12 min read

This article explains how Java 14 introduces Records to reduce boilerplate class definitions, Pattern Matching to streamline instanceof checks, Switch expressions to treat switch as a value-producing construct, and enhanced NullPointerException messages that pinpoint the exact null source, making code clearer and more concise.
Java 14NullPointerExceptionRecords
0 likes · 5 min read

Java 14 introduces several language enhancements—including preview pattern‑matching for instanceof, concise record types, switch expressions with arrow syntax, and multi‑line text blocks—each demonstrated with code examples, setup steps, and compiled bytecode insights to help developers quickly adopt these productivity‑boosting features.
JavaJava 14Records
0 likes · 10 min read

Java 13 introduced five new features, with Text Blocks gaining the most attention, while the upcoming Java 14 Early‑Access preview highlights three potential enhancements: improved NullPointerExceptions, a new non‑volatile memory mapped byte buffer mode, and the stabilization of Switch Expressions with pattern‑matching syntax.
JDKJavaNullPointerException
0 likes · 5 min read

This article summarizes the major JDK 11‑13 updates, including switch expression simplifications, multi‑line text block literals, dynamic AppCDS archives, ZGC memory‑release enhancements, a modernized socket API, new FileSystems methods, bulk NIO ByteBuffer operations, the Reiwa era in java.time, Unicode 12.1 support, and several deprecated features that have been removed.
Core LibraryJDKJava
0 likes · 10 min read
