The result of this code will print “no,” because you assign test1 to false test1 = false the if statement then evaluates to false, because then you evaluate to test1 == false and another block executes
This may be what you are looking for:
if ((test1 == false) || (test1 == false)) //this line if the first answer is true it returns true without checking the seconded statement. // if (test1 == false) would be the, same elauates as true { System.out.println("Yes"); } else { System.out.println("No"); }
Look for a short circuit or an operator, this can help you better understand the problem.
Reign
source share