Recursive methods work by calling themselves to solve subproblems
until the subproblems are simple enough for them to solve directly.
The portion of a recursive method that handles the simplest cases is
called the base part; the portion that transforms more complex cases is
called the recursive part.
If you want to solve a difficult problem, then try to break it up into
simpler subproblems.
If you are writing a recursive method, then your method must
handle the simplest cases, and must break down every other case into
the simplest cases.
If your recursive method is to count down a number, then you may be
able to instantiate the following recursive counting pattern:
public static int method name (int n) {
if (n == 0) {
return result for n equal 0;
}
else {
return combination operandcombination operatormethod name(n - 1);
}
}