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.
- Күн бұрын
New Switch Concept | Java 12+ | Switch Expression | No Need Of Break | Return Value From Switch |
- Рет қаралды 260
Пікірлер: 1