This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Jim, as limoki said, the only mistake I can see here is a typo on "Else" which should read "else" instead, but that's all. The code is otherwise correct and the correct answer is C. Pay special attention to statements like if(a = true) which is not the same as if(a == true) In the former, the condition will always be true since the boolean variable a is assigned true anf the whole expression evaluates to a's value, that is true. limoki, Welcome to Javaranch We'd like you to read the Javaranch Naming Policy and change your publicly displayed name (change it here) to comply with our unique rule. Thank you. PS: Quote from the naming policy:
For your publicly displayed name, use a first name, a space, and a last name. Obviously fictitious names or improperly formatted names may be locked out.
[ September 19, 2002: Message edited by: Valentin Crettaz ]