Given the following recursive method:
public static long method(long a, long b) {
if (a == 0) {
return 1;
} else if (a == 1) {
return b;
}
return b * method(a - 1, b);
} What does the method calculate?
Given the following recursive method:
public static long method(long a, long b) {
if (a == 0) {
return 1;
} else if (a == 1) {
return b;
}
return b * method(a - 1, b);
} Create a free account to access the full topic