Home Feedback Other Books Previous Day Next Day
Certification answer: Answer (d) is correct. This class uses recursion, the technique of calling a method within itself. Calling getValue(17) causes getValue(34) to be called, which causes getValue(68) to be called, which causes getValue(136) to be called. Because 136 is greater than 100, getValue() will return that value instead of calling itself again.
Answers (a), (b), and (c) are incorrect.