Limited access

Upgrade to access all content for this subject

Consider the following method.

public static int kooky(int a)
{
    if (a>10)
        return 2;
    else
    if (a<5)
        return 5+kooky(a+2);
    return a+kooky(a+1);
 }

How many times is the method kooky being called when the following statement is executed?

kooky(1);
A

10

B

9

C

8

D

7

E

6

Select an assignment template