Secrets of multiplication

Report a typo

Given a recursive method:


public static int method(int n) {
    if (n == 0) {
        return 1;
    } else {   
        return 2 * method(n - 1);
    }
}

Enter the result of the following invocation:

method(8);
Enter a number
___

Create a free account to access the full topic