I have the following if() statement:
if (stringCharCheck(x, num) && xm1.equals("-") && (!stringCharCheck(xm2, num)||!xm2.equals("-")))
When I get rid of the or so either:
if (stringCharCheck(x, num) && xm1.equals("-") && !stringCharCheck(xm2, num))
or
if (stringCharCheck(x, num) && xm1.equals("-") && !xm2.equals("-"))
Everything works as intended. The stringCharCheck method is a boolean and I just want to say "if false or xm2 == "-" then do this...
I can't see what I am doing incorrectly.
Aucun commentaire:
Enregistrer un commentaire