I am wondering if I can use orin switch-casein Java?
or
switch-case
Example
switch (value) { case 0: do(); break; case 2 OR 3 do2(); break; }
There is no "or" operator in a case statement in Java. However, you can allow one case to “fail” with another by omitting the statement break:
break
switch (value) { case 0: do(); break; case 2: // fall through case 3: do2(); break; }