Solved

Which Line of Code in the Java Program Below Is

Question 12

Multiple Choice

Which line of code in the Java program below is the recursive invocation of method myFun?
1 public class test03
2 {
3 public static void main(String[] args)
4 {
5 for (int i = 0; i < 4; i++)
6 {
7 System.out.print(myFun(i) + " ") ;
8 }
9 System.out.println() ;
10 }
11 public static int myFun(int perfect)
12 {
13 return ((perfect - 1) * (perfect - 1) ) ;
14 }
15 }


A) 7
B) 11
C) 13
D) There is no recursive invocation

Correct Answer:

verifed

Verified

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents