This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This kid of question tests your recognition of the difference between the assignment operator (flag=true) and the equality test (flag==true). The test: if (flag=true) succeeds if the assignment statement succeeds. flag is a boolean variable, so the assignment is ok because true is a boolean value. This branch therefore will execute its code. ----------------- Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide [This message has been edited by Michael Ernest (edited December 27, 2000).]
Make visible what, without you, might perhaps never have been seen. - Robert Bresson