The output of the following line of code is: Not Done End
boolean notDone = false; if (notDone = true) System.out.print("Not "); if( notDone = false) System.out.print("Done "); System.out.println("End");
The answer is false but I am having a hard time understanding why. Aren't the if statements setting notDone equal to true which would print Not and then go to the second loop and set notDone equal to false then print out Done and then End since none of the if statemends are comparing notDone to the initial notDone variable. Thanks!