About Question enthuware.ocajp.i.v7.2.1245 :
Moderators: Site Manager, fjwalraven
About Question enthuware.ocajp.i.v7.2.1245 :
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?
-
- Site Admin
- Posts: 10045
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1245 :
Yes, and it is indeed marked as a correct option.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Wed Aug 07, 2013 4:39 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1245 :
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.
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.
-
- Site Admin
- Posts: 10045
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1245 :
The option has now been updated.
Thank you for your feedback.
-Paul.
Thank you for your feedback.
-Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 33 guests