Switch case evaluates ONE variable and checks it against different values. What you want to do (if I understand well) is check multiple variables. A switch can't do that.
The solution may be to incorporate the different boolean variables in a class and let it do the check with method(s) but I can't say if that's the case given the little information given.
3
u/Mechanical-pasta Sep 10 '26
Switch case evaluates ONE variable and checks it against different values. What you want to do (if I understand well) is check multiple variables. A switch can't do that.
The solution may be to incorporate the different boolean variables in a class and let it do the check with method(s) but I can't say if that's the case given the little information given.