My problem is that I usually get a java.lang.StackOverflowError when I use recursion.
My question is - why does recursion cause stackoverflow so much more than loops do, and
Every time you call a method, you consume a "frame" from the stack, this frame is not released until the method returns, it doesn't happen the same with loops.