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
Sur cette page du site, vous pouvez voir la vidéo en ligne Java 13 Features | Switch expression vs switch statement in java JDK 13 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Java Beam 28 September 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 142 fois et il a aimé 1 téléspectateurs. Bon visionnage!