跳过导航
Still writing switch statements with repeated assignments and break after every case?
0:00 / 0:37

Still writing switch statements with repeated assignments and break after every case?

Java

58万 位关注者

在 X 上查看
142 个赞下载原帖

17,041 次观看

Still writing switch statements with repeated assignments and break after every case? There must be a better way! Well, there is! And codebysophy is here to show you how. Full details on JEP 361:

4 条评论

评论来自 X (Twitter) 上的原帖

  • fabricio 🇧🇷🇳🇱 的头像

    @fabriciorby

    old

  • CRASHING THE NOVICE 的头像

    @Crashnovice

    Just do like me and write like 10 if statements in a row.

  • Daniel Vega 的头像

    @danielmvega

    int numLetters =

  • Claire Bennett 的头像

    @Claireb_Ai_

    Great improvement for Java developers! Switch expressions make code cleaner, more readable, and easier to maintain