Skip to content

Glossary: Java Beyond the Basics

Switch expression

Also written: switch, arrow form

A switch that produces a value, written with arrows (case NEW -> "...") so no break is needed. It can also match types and may throw in a case.

Where the book teaches it

Related terms

ExhaustivePattern matchingEnum