+ 1

Switch expression in Java

The switch expression(with multiple cases) in java does not seem to work outside solo learn code playground...

22nd Jun 2021, 4:21 AM
kushal
1 Antwort
+ 5
Check the version of Java that you're attempting to use the switch expression with. It was introduced in Java 12 and updated in Java 13 to utilize the yield statement.
22nd Jun 2021, 4:46 AM
ChaoticDawg
ChaoticDawg - avatar