Answers to Self-Review Exercises

15.1
  1. False. A method that calls itself indirectly is an example of recursion—more specifically, an example of indirect recursion.

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

  3. True.

  4. 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.

15.2d
15.3a
15.4c
15.5b
15.6
  1. golden ratio, golden mean.

  2. top.

  3. last-in, first-out (LIFO).

  4. activation record, stack frame.

  5. stack overflow.

  6. selection.

  7. self-similar.

  8. permutations.

  9. method-call.

Get Java™ How to Program, Seventh 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.