Summary
Recursion is a handy programming technique that is used for a few complex problems. You'll commonly find recursion in mathematical formulas, as well as when traversing hierarchical data structures such as binary trees or XML documents. With recursion, a Java method or a class calls itself. But do not forget to code a terminating condition, or you'll find your application quickly runs out of memory on the Java call stack. you'll find your application quickly runs out of memory on the Java call stack.
In the next chapter, you'll learn about predicates and functional programming with Java.