subject

A recursive method may call other methods, including calling itself. A recursive method has: 1. a base case -- a case that returns a value or exits from a method without performing a recursive call.
2. a recursive case -- calling the method again with a smaller case..
Study the recursive method given below.
For example, this call recursiveMethod (5); returns 15:
public static int recursiveMethod (int num) (
if (num == 0)
return 1;
else {
if (numX2!=0)
return num * recursiveMethod (num -1);
else
return recursiveMethod (num-1);
}
}
1 What is the base case?
2. What does the following statement check?
3. What does the method do?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:50
15: 28read the summary of "an indian's view of indian affairs."15 betterin "an indian's view of indian affairs," it is asserted that conflicts could be reduced if white americansunderstood native americans..pswhich of the following would make this summary more complete? eleo the fact that chief joseph believes the great spirit sees everythinthe fact that chief joseph was born in oregon and is thirty-eight years oldo the fact that chief joseph states that he speaks from the hearthehehethe fact that chief joseph of the nez percé tribe made this claimebell- ==feetle===-felsefe ==submitmark this and retum.=
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
You know the right answer?
A recursive method may call other methods, including calling itself. A recursive method has: 1. a b...
Questions
question
Business, 04.11.2020 01:00
question
English, 04.11.2020 01:00
question
Mathematics, 04.11.2020 01:00
question
Mathematics, 04.11.2020 01:00
question
Mathematics, 04.11.2020 01:00
question
History, 04.11.2020 01:00
question
English, 04.11.2020 01:00
question
Spanish, 04.11.2020 01:00
Questions on the website: 13722367