“Integer number too large” Fehlermeldung für 600851475143

public class Three {
    public static void main(String[] args) {
        Three obj = new Three();
        obj.function(600851475143);
    }

    private Long function(long  i) {
        Stack<Long> stack = new Stack<Long>();

        for (long j = 2; j <= i; j++) {
            if (i % j == 0) {
                stack.push(j);
            }
        }
        return stack.pop();
    }
}

Wenn der obige Code ausgeführt wird, wird in der Zeile @ ein Fehler ausgegebeobj.function(600851475143);. Warum

Antworten auf die Frage(16)

Ihre Antwort auf die Frage