Possible duplicate:
Can I use OR statements in Java switches?
I have a switch statement. Is there a way to do or operator in the switch. Those.
switch(val){
case 1
break;
case 2
break;
case 3
break
}
Instead, do something like
switch(val){
case 1 or 3
break;
case 2
break;
}
source
share