New Switch Concept | Java 12+ | Switch Expression | No Need Of Break | Return Value From Switch |
Vložit
- čas přidán 11. 09. 2024
- Java has changed Switch - case concept a lot making it more powerful and robust. Now we can just remove writing break statement after every case in switch. We can also have a case with multiple values in new switch in Java. We can return values from switch and can use it as switch expression.
Good to know about these changes. Thanks.