Obscure method

Report a typo

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?
Select one option from the list
___

Create a free account to access the full topic