Sorry for my noob, my IllegalArgumentException cannot run..

Can anybody help?:(

import java.util.*;

public class test2 {

public static void main(String[] args) {

Stack stack = new Stack();

Scanner keyIn = new Scanner (System.in);

int i = 0;

int j = 0;

int temp0;

int temp1;

while (true){

System.out.println("Enter numbers to find GCD of (0 to stop):");

System.out.println("Input i ");

i = keyIn.nextInt();

if (i == 0)

break;

if (i > -1){

stack.push(i);

} else {

throw new IllegalArgumentException("negative number" );

}

System.out.println("Input j ");

j = keyIn.nextInt();

if (i == 0)

break;

if (i > -1){

stack.push(j);

} else {

throw new IllegalArgumentException("negative number" );

}

temp0 = (Integer) stack.pop();

temp1 = (Integer) stack.pop();

//display value gcd, call GCD method, pass value temp0 and temp1

System.out.println("The GCD : " + gcd(temp0, temp1));

}

}

}

private static int gcd(int i, int j){

int r;

r = i % j;

return r;

}

}