Recursion. A recursive method is a method that calls itself either directly or indirectly. There are three important rules of thumb in developing recursive programs:
- The recursion has a base case.
- Recursive calls must address subproblems that are smaller in some sense, so that recursive calls converge to the base case.
- Recursive calls should not address subproblems that overlap.