--%>

Explain Recursion

Recursion: Recursion outcomes from a method being invoked whenever an existing call to the similar method has not yet returned. For example:

    public static void countDown(int n){
        if(n >= 0){
            System.out.println(n);
            countDown(n-1);
        }
        // else - base case. End of recursion.
    }

   Related Questions in Programming Languages

  • Q : Ffunction of DynamicPopulateExtender

    What is the function of DynamicPopulateExtender control?

  • Q : Differentiate between MFC and Win32

    Differentiate between MFC and Win32?

  • Q : Explain Interpreter Interpreter : A

    Interpreter: A program that executes a translated version of the source program by implementing a virtual machine. The interpreters usually simulate the actions of an idealized Central Processing Unit. An interpreter for Java should implement the Java

  • Q : Explain Static variable Static variable

    Static variable: It is a static variable defined within a class body. Such a variable fits in to the class as a whole, and is, thus, shared by all objects of the class. The class variable may be employed to define the default value of an instance vari

  • Q : Aggregation and containment in the

    Illustrate the basic difference between Aggregation and containment in the Programming?

  • Q : ASP.NET Session handling How to set

    How to set Session time out in ASP.NET. I tries changing in config file but still facing issue. Please help..

  • Q : Define Inner class Inner class : A

    Inner class: A class defined within an enclosing method or class. We use the word to refer to non-static nested classes.

  • Q : CPU programming When a process enters

    When a process enters the CPU, your program must now "fork"and "exe" a stand alone child process. You MUST use "glxgears" for the child process.                            When a context switch occurs

  • Q : State the term UDDI State the term UDDI?

    State the term UDDI?

  • Q : Define Number of Threads Number of

    Number of Threads: Threads can be a useful abstraction and implementation mechanism to partition independent program actions. However, when there is coordination (or interference) between these threads, the required synchronization mechanisms increase