Page 1 of 1
About Question enthuware.ocajp.i.v7.2.1245 :
Posted: Thu Aug 23, 2012 12:11 pm
by ETS User
I think there's a problem with the question. If line 3 is removed, the variable i will be undefined for line 4, and so, the code will not compile, as the Option 2 is stating. Therefore, option 2 is correct, is it not?
Re: About Question enthuware.ocajp.i.v7.2.1245 :
Posted: Thu Aug 23, 2012 5:56 pm
by admin
Yes, and it is indeed marked as a correct option.
HTH,
Paul.
Re: About Question enthuware.ocajp.i.v7.2.1245 :
Posted: Wed Aug 07, 2013 4:51 pm
by dhunziker
I think this question is a bit misleading. Asking whether or not the Test class prints 20 in the end. If I'd say that it prints "0 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 20" in the end then that would be correct too. At the same time you could say that if it doesn't print all those numbers in the end the program doesn't work, or at least that any other statement about its output would be incorrect.
If statement number 1 was something like:
"Prints 20 at the end of its output"
"Last number printed is 20"
then, to me, the question would be more accurate.
Re: About Question enthuware.ocajp.i.v7.2.1245 :
Posted: Fri Aug 09, 2013 5:13 am
by admin
The option has now been updated.
Thank you for your feedback.
-Paul.