≈ the.bay.news

Java sealed classes and exhaustive pattern matching

Neil Madden
Java sealed classes and exhaustive pattern matching
Java 17 introduced sealed classes, which allow you to explicitly list the allowed sub-types of an interface or base class. For example, here’s a toy example using a sealed interface and records (in…

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.