C H A P T E R  5

Image

Recursive Operations: Walks

As you probably know, recursive programming is a debated technique because it usually needs a lot of memory but it simplifies some programming tasks. Basically, a recursive programming is a situation in which a procedure calls itself, passing in a modified value of the parameter or parameters that were passed in to the current iteration of the procedure. Programming tasks such as calculating factorial, Fibonacci numbers, anagrams, and Sierpinski carpet are just a few of the well-known tasks that can be accomplished through the recursive programming technique. The following code snippet uses this technique ...

Get Pro Java 7 NIO.2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.