•Something defining itself is called recursion.
•Java supports recursion.
•Methods calling themselves are called recursive methods and this process is called recursion.
•Generally in recursive methods we conditional statements like “if” to exit.
•Also, we must use the “return” statement to return a value.
•When a recursive method is executed, all the local variables in the method are stored on the stack.
•For each call of the recursive method, the local variables are stored on the stack.
•Java supports recursion.
•Methods calling themselves are called recursive methods and this process is called recursion.
•Generally in recursive methods we conditional statements like “if” to exit.
•Also, we must use the “return” statement to return a value.
•When a recursive method is executed, all the local variables in the method are stored on the stack.
•For each call of the recursive method, the local variables are stored on the stack.
No comments:
Post a Comment