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).]