In this section, we will try to understand the recursion process and see how it takes place. We will discuss more about the base condition in the next section. Note that the precondition is also called base condition. The general syntax of recursion is as follows: methodName (T parameters…) Note that a precondition is necessary for any recursive method as, if we do not break the recursion then it will keep on running infinitely and result in a stack overflow.
0 Comments
Leave a Reply. |