Recursive Function in Java
A function which calls itself is known as a recursive function. A recursive function has two cases:
Recursive Case
It is the actual problem that needs to be solved. Recursive case is where the logic is applied.
Base Case
The part of the problem whose solution is known to us is known as the base case or the stopping case. In other words, it is the part which is used to control the recursion.
The figure below explains recursion.