This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
From just looking at it, I agree with your test output... it works as you'd expect so the answer is A (I think). I can't see anything syntactically incorrect, nor anything which will raise an exception.
Of course, the horrendous HTML code is another matter entirely - should there possibly be an option for "my browser complained about badly written HTML/XML"?
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )
Ya i agree with you that the answer suppose to be A but when i answered it like this in the simulator it was wrong & the right answer was D !! without any clarification !! so may be it's a wrong answer..
Joined: Apr 20, 2002
Could not tell which answer the simulator gave from your first post. I got the same answer when I ran it.