Answers to Self-Review Exercises

18.1

a) False. A method that calls itself in this manner is an example of indirect recursion.

b) False. Recursion can be inefficient in computation because of multiple method calls and memory-space usage.

c) True.

d) False. To make recursion feasible, the recursion step in a recursive solution must resemble the original problem, but be a slightly smaller version of it.

18.2 d

18.3 a

18.4 c

18.5 b

18.6

a) golden ratio, golden mean.

b) selection.

c) self-similar.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.