Extend switch so it can be used as either a statement or an expression, and so that both forms can use either traditional case labels (with fall through) or new case labels (with no fall through), with a further new statement for yielding a value from a switch expression.
These changes will simplify everyday coding, and prepare the way for the use of pattern matching in switch.
This was a preview language feature in JDK 12 and JDK 13.
#JavaBeam #Java13Features #SwitchExpressionInJava #Java #Java13NewFeatures
Watch video Java 13 Features | Switch expression vs switch statement in java JDK 13 online without registration, duration hours minute second in high quality. This video was added by user Java Beam 28 September 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 134 once and liked it 1 people.