Still writing switch statements with repeated assignments and break after every case?
Java
Auf X besuchen576.099 Follower
17.041 Aufrufe
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 Kommentare
Kommentare aus dem Originalbeitrag auf X (Twitter)

@fabriciorby
old

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

@danielmvega
int numLetters =

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