CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer, see below for more

A: A recursive method is one whose method body includes a call to itself, so that it is called repeatedly until an expected condition is met or it cannot continue the recursion any longer. These methods often take an object or numeric argument that is subject to progressive interrogation or mathematical processing at each pass. Recursive methods must be designed carefully to ensure that they do not result in a very deep or endless recursion, which is likely to cause an OutOfMemoryError.

A simple example of a recursive method is the getNodeByName(String) method below, which iterates through all child nodes in an object structure until it finds one that matches, or returns null.

… full answer hidden

Click for full answers

Premium members click below for full answer
What is a recursive method?

Un-social media

We love social media, but we do not expect you to create yet another public outpost on the Web.

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager