Tagged articles
Sealed Classes
28 articles · Page 1 of 1
The article walks through a real‑world refactor of a Java event‑handling system, showing how instanceof pattern matching, switch pattern matching, record patterns, sealed classes and the new JDK 25 syntax features replace verbose if‑else chains and the Visitor pattern, yielding shorter, safer, compile‑time‑checked code.
JDK 25JavaRecords
0 likes · 15 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

The article examines why many projects still cling to Java 8 and demonstrates eight transformative Java 21 features—including records, sealed classes, pattern‑matching for instanceof, switch expressions, text blocks, virtual threads, structured concurrency, and enhanced APIs—showing code examples and the benefits they bring to performance, readability, and maintainability.
JavaJava 21Records
0 likes · 11 min read

The article argues that Java’s legacy null‑pointer crashes are driving teams toward Kotlin’s built‑in null safety, sealed classes, data classes, extension and scope functions, coroutines, Compose Multiplatform, and context parameters, making Kotlin the preferred JVM language for new projects by 2026.
Compose MultiplatformCoroutinesData Classes
0 likes · 7 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

This comprehensive guide walks you through the evolution of Java from version 8 to 24, highlighting key language enhancements, new APIs, and performance improvements such as lambda expressions, Stream API, records, sealed classes, virtual threads, and the latest features that modernize Java development for today’s programmers.
JavaJava 8Records
0 likes · 46 min read

This article explores JDK 17’s most impactful language enhancements—records, sealed classes, pattern matching, text blocks, var, and new APIs—showing how they reduce boilerplate, improve readability, and boost performance for Java developers transitioning from older versions.
JDK 17JavaRecords
0 likes · 14 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 Java 17 enhancements—including records, sealed classes, pattern matching, text blocks, var, improved switch expressions, stream API upgrades, enhanced NullPointerException, new garbage collectors, and the foreign memory access API—showing how they simplify code, boost performance, and modernize Java development.
JDK 17JavaRecords
0 likes · 15 min read

This article explores the most impactful Java 17 enhancements—including records, sealed classes, pattern matching, text blocks, var, enhanced switch, and new APIs—showing how they simplify code, improve readability, boost performance, and modernize Java development for both beginners and seasoned programmers.
JDK 17JavaSealed Classes
0 likes · 13 min read

Discover how Java 17’s new features—record classes, sealed classes, pattern matching, text blocks, enhanced switch expressions, var type inference, improved Stream API, and better NullPointerException messages—streamline code, boost readability, and increase performance, with practical examples and tips for modern Java development.
JDK 17JavaSealed Classes
0 likes · 11 min read

This article explains why upgrading from Java 8 to JDK 17 is essential, detailing new language features such as records, sealed classes, pattern matching, text blocks, var inference, enhanced switch, Stream API improvements, better NullPointerExceptions, modern garbage collectors, and the foreign memory access API, all illustrated with concise code examples.
JDK 17JavaSealed Classes
0 likes · 13 min read

JDK 17 introduces sealed classes, pattern matching, text blocks, and record types that together transform Java code into a more declarative, concise, and safe style, offering developers modern syntax, reduced boilerplate, compile‑time exhaustiveness checks, and better readability while maintaining performance and ecosystem compatibility.
JDK 17JavaRecord Classes
0 likes · 7 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

This article explains why upgrading from Java 8 to the long‑term‑support JDK 17 is essential, detailing record types, sealed classes, pattern matching, text blocks, var inference, enhanced switch, and other modern features that dramatically reduce boilerplate, improve readability, and boost performance for backend developers.
JDK 17Sealed ClassesStream API
0 likes · 14 min read

This article walks through JDK 17’s most impactful language upgrades—including records, sealed classes, pattern matching, text blocks, var inference, enhanced switch, and new APIs—explaining their syntax, practical use cases, and how they simplify Java code while improving performance and maintainability.
JavaSealed ClassesText Blocks
0 likes · 12 min read

This article explores the major Java 17 language enhancements—including records, sealed classes, pattern matching, text blocks, var, and the new switch expression—showing how they reduce boilerplate, improve readability, and boost performance compared to legacy Java 8 code.
JDK 17JavaSealed Classes
0 likes · 13 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


政采云技术Jan 25, 2024 · Fundamentals
This article provides a comprehensive overview of the major language and runtime enhancements introduced in JDK 12 through JDK 17, covering switch expressions, micro‑benchmarking with JMH, class‑data sharing, garbage‑collector improvements, new String methods, hidden and sealed classes, records, and unified asynchronous logging, all illustrated with code examples.
JDKJMHJava
0 likes · 23 min read

This article explores the trade‑offs between efficiency, readability and maintainability in software development, presents common naming conventions and best‑practice guidelines for Java, discusses proper use of comments, and introduces advanced language constructs such as records, sealed classes and the upcoming Valhalla project.
Code styleImmutable ObjectsJava
0 likes · 29 min read

The article reviews the most notable Java 17 language enhancements—including text blocks, records, concise switch expressions, pattern‑matching instanceof, sealed classes, and richer NullPointerException messages—explaining their syntax, benefits, and providing side‑by‑side code comparisons with Java 11.
Java 17RecordsSealed Classes
0 likes · 9 min read

This article explains Java 17’s sealed classes, describing how the new sealed, non‑sealed, and permits keywords let developers precisely restrict inheritance hierarchies, with concrete code examples and a three‑layer hero model illustrating practical usage.
InheritanceJDK 17Java
0 likes · 7 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

Java 16 introduces a slew of enhancements—including sealed classes, stronger encapsulation, a foreign‑linker API, ZGC improvements, elastic metaspace, and the jpackage tool—while following a tight release schedule, and sets the stage for the upcoming LTS release of Java 17.
Foreign Linker APIJDK 16Java
0 likes · 7 min read

Java 16, scheduled for release in March 2021, introduces a range of enhancements such as sealed classes, stronger encapsulation, foreign‑memory access, pattern matching for instanceof, a new jpackage tool, ZGC improvements, Unix‑domain sockets, and expanded platform support, all aimed at improving security, performance, and developer productivity.
JDK 16JavaSealed Classes
0 likes · 8 min read

The article outlines the upcoming JDK 16 release, detailing new language and JVM features such as sealed classes, stronger encapsulation, foreign‑memory access, pattern matching for instanceof, Unix‑domain socket channels, ZGC improvements, jpackage support, and platform migrations to Windows/AArch64 and Alpine Linux.
JDK16New FeaturesSealed Classes
0 likes · 7 min read

This article explains Java JDK 15’s sealed class feature, showing how to declare sealed classes, the required permits clause, and the necessary final, sealed, or non‑sealed modifiers for subclasses, illustrated with complete code examples.
InheritanceJDK15Java
0 likes · 3 min read

Explore the key Java 15 enhancements—including Text Blocks for effortless multiline strings, Records and local records for concise data models, Pattern Matching for streamlined type checks, Sealed Classes to control inheritance, and the low‑latency ZGC—plus practical IDE tips for using these features effectively.
JDK15JavaRecords
0 likes · 9 min read
