This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Answer : prints 61433 I've tested this prog. and indeed it prints 61433 ; I just don't know why he prints the last 3 because at that time x=3 and the loop should stop, no ? Stupid question but I just don't get it...
Kristof, the first time it prints 3 the value of success is 1, the second iteration the (x != 3) returns false however (success < 2) return true, which allows one more iteration of the loop, thus printing 3 and then exiting. Hope this helps.
- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. - What truth? - That there is no spoon!!!