Hello everyone,
Right now I am studying for the OCA
Java 8 exam and yesterday I did the review questions of chapter 2 again (book OCA Oracle Certified Associate Java SE 8 Programmer I by Jeanne Boyarsky and Scott Selikoff).
While I was making these review questions I noticed something at question number 16.
I don't know if anyone else noticed this:
the question says:
what is the output of the following code snippet?
so after making the questions, I checked at the answers of chapter 2 review questions < 15 questions answered good of 20 and 5 questions wrong answered of 20.
But when I looked at the answer for question 16 I saw this:
After the first execution of the loop, i is decrememted to 9 and result to 13.
But according to the book, a value is decremented by 1.
How is it then in this case that int result is decremented with 2 instead of 1?
Can somebody please help me with this?