In C# and Java switch expressions are an alternative to the switch statement that returns a value.
C#
In C#, switch expressions support the same pattern-matching features offered by switch statements. This makes them similar to the match
operator found in functional languages like scala and f#
They were introduced in c#-8.0.
Java
In java, switch expressions are a form of the switch label written with "case L ->" syntax. They are an alternative to switch statements.
They were added as a preview feature in Java 12 under JEP 325.
See JEP 325.