Predict the result

Report a typo

Given a recursive method:


public static long method(long n) {
    if (n <= 1) {
        return n;
    }
    return n + method(n - 1) - 1;
}

Enter the result of the following invocation:

method(7);
Enter a number
___

Create a free account to access the full topic