?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Kooky Count Recursive Method

APCSA-AGVV8K

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