This is called flow scoping. Pattern matching is a rich feature arc that will play out over several Java versions. Future installments will bring us patterns in switch, deconstruction patterns on ...
Learn how to use pattern-matching features in your Java programs, including pattern matching with switch statements, when clauses, sealed classes, and a preview of primitive type pattern matching in ...