Introduction
Recursion is where a method calls itself, over and over again. Recursion, when used carefully, can be a useful programming technique; but the key is to use it correctly.
An important point is that recursion is just a programming technique. You can often avoid it, if you want, by writing some form of an iterative loop. However, if the problem you need to solve is truly recursive, the iterative approach will likely be much more complex than the comparatively simpler and more elegant recursion code which corresponds.
This chapter delves into this handy programming technique.