Consider the following definition of a recursive method.public static int recFunc(int num){ if (num >= 10) return 10; else return num * recFunc(num + 1);}What is the output of the following statement?System.out.println(recFunc(8));
A. 8
B. 72
C. 720
D. None of these
Answer: C
You might also like to view...
When a reference variable is passed as an argument to a method __________.
a. a copy of the variable's value is passed into the method's parameter b. the method has access to the object that the variable references c. the method becomes a static method d. the program terminates
The ________ function calculates loan payments
Fill in the blank(s) with correct word
When testing your theory, you discover that you are wrong. ? What is your next step in the troubleshooting process?
A. Ask your client more questions. B. Establish a plan of action to resolve the problem. C. Establish a new theory of probable cause. D. Document your findings.
Which account has elevated privileges on a Linux box? (hint: also the name of a character on Person of Interest)
a. administrator b. guest c. root d. power user