boolean a = true
boolean b = true
<random code in here, booleans may or may not change>
if ((!a || !b) || (!a && !b)){
doSomethingElse();
}
This code is not working for me, what is a simple solution to this problem?
To be clear:
The if statement should work:
if at least one of the booleans is false
3 cases:
a = False b = True
a = True b = False
a = False b = False
I could do this in one long if statement, but I was just wondering if there was a simple way to implement this.
This should work for you: