r/javahelp • u/IceCreamInsides • Sep 10 '26
Solved Switch case with boolean
So, there is no way I can do that?
want to check several boolean variables in a switch statement. Is `if-else` the only way to do this?
Boolean a, b, c...
Switch (false) {
Case (a) :
//some code
Case (b) :
Case (c) :
//and so on
}
2
Upvotes
1
u/[deleted] Sep 10 '26 edited Sep 15 '26
[removed] — view removed comment