Java offers two switch styles: the classic C-style statement with colons and break, and the modern arrow switch expression finalized in Java 14. Knowing why modern arrow switch eliminates accidental fall-through makes your multi-branch code both shorter and safer.
More lessons in Complete Core Java