News

When the recursive Java factorial program runs, it creates a stack of method calls that look like this: factorialFunction(5) factorialFunction(4) factorialFunction(3) factorialFunction(2) ...
Recursion has more expressive power than iterative looping constructs. I say this because a while loop is equivalent to a tail recursive function and recursive functions need not be tail recursive.