?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Recursion Tracing

APCSA-D1IDLB

Consider the following method:

 public int mystery(int x)
 {
     if (x == 1)
         return 3;
     else
         return (3 * mystery(x - 1));
 }

What is returned as a result of the call mystery(5)?

A

3

B

9

C

27

D

81

E

243