Mysterious division

Report a typo

Given the following recursive method:

public static long method(long n) {
    if (n == 0) {
        return 0;
    }            
    return n % 10 + method(n / 10);
}

Enter the result of the following invocation:

method(29815);
Enter a number
___

Create a free account to access the full topic