Worked example
int day = 3;
String name = switch (day) {
case 1 -> "Mon";
case 2 -> "Tue";
case 3 -> "Wed";
default -> "?";
};
System.out.println(name); // Wed
Compare with the old style: no break, no accidental fall-through, and the whole thing is an expression with a result.