This is question 6 from RHE I/O
Test (Chapter 13, page 471)
What does the following code fragment print out at line 9?
The answers given are (Choose only one type radio buttons)-
A) The output is i = 30.
B) The output is i = 20.
C) The output is i = 10.
D) There is no output because the code throws an exception at line 1.
E) There is no output because the code throws an exception at line 5.
But the code is not included in the try-catch blocks, so it will not compile,
Do we have to assume that the code is included in the try-catch block?
I ask this because in the previous qusetion of the same test,
the code is enclosed in the try-catch block.
Do I have to make a similar assumptio in the actual exam, since "Code will not compile"
option is not there in the answers? I have looked it in the RHE errata, but
there's no explanation available for this one.
Also, the semi-colon is missing on line 8, but I think it's only a typo and in the
actual exam, I hope that we will not be tested for its presence for compilaltion,
all other things being correct.
TIA,
- Manish