Multiple Choice
Look at the following method: public static int test2(int x, int y)
{
If ( x < y)
{
Return -5;
}
Else
{
Return (test2(x - y, y + 5) + 6) ;
}
}
What is returned for test2(10, 20) ?
A) 6
B) 10
C) 1
D) -5
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q19: Look at the following pseudocode algorithm: algorithm
Q20: Unlike a loop, a recursive method does
Q21: This type of method is a method
Q22: Look at the following method: public static
Q23: Look at the following pseudocode algorithm: algorithm
Q25: Recursive algorithms are usually less efficient than
Q26: The Towers of Hanoi is:<br>A) a mathematical
Q27: How many times will the following method
Q28: To solve a program recursively, you need
Q29: Like a loop, a recursive method must