Hi all, i am practising the mock test questions from the OCP java SE 6 Programmer Practice Exams. There is a question i could not figure out:
What do you all think about the answer?
posted 5 years ago
I think forandboth this and b in the go() method refer to the same object. Therefore this can be replaced by b which makes it a bit more readable.
In the case of go() is called from within go(). Thereforeis done twice resulting in being 7. The answer is 2 7 then.