Can someone explain the benefits of tail recursion.
The last statement in this case would be the recursive call. I think it would still require another stack as the result is still not 'returned' to the component that called it.
I've been told that it does'nt require any method stack overhead.
I'm fairly certain that the JVM does not perform this optimization, which is probably just as well - recursive method calls aren't all that common in Java. But other languages make that improvement, Scheme (a Lisp dialect) for example.
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad: