Solved

Consider the Following Definition of a Recursive Method

Question 5

Multiple Choice

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(10) ) ;


A) 10
B) 110
C) This statement results in infinite recursion.
D) None of these

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions