In this chapter, you learned about the essentials of recursion. Apart from looking at the theoretical foundation for recursion, you also were presented with a couple of typical recursion examples.
The important points covered in this chapter are reviewed in this section.
When a method calls itself from within its own method body, the method is called a recursive method. The use of recursive methods is called recursion.
Recursive method calls result in pending method instances of the recursive method.
A successful recursive method contains a branching statement, one or more base cases, and one or more recursive calls. Each recursive call must move toward the base case to avoid infinitely many recursive calls.
Recursion is suited to solve ...
No credit card required