Java   View all facts   Glossary   Help
member > method > recursive method
Next methodsubstring    Upmethod    Previous methodpublic method   

recursive method comparison table
Subject work by is a kind of is a synonym of have example has definition use is partitioned into
method specificationmember function Code that specifies some of the behaviour of a class or instancethe super method to invoke a method declared in the superclassstatic method, instance method
recursive methodcalling itself to solve a subproblem until the subproblem is simple enough to solve directlymethod 
//Recursive method to compute the nth power of 2

public static int recursivePowerOf2 (int n) {
if (n == 0) {
return 1;
}
else {
return 2 * recursivePowerOf2(n-1);
}
}
A method that calls itselfrecursion 

Next methodsubstring    Upmethod    Previous methodpublic method