what i am doing wrong. Could anyone give me a hint? Please?
package de.codegym.task.task14.task1420;
/*
GGT
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Solution {
public static void main(String[] args) throws Exception {
int a = 0;
int b = 0;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
a = Math.abs(Integer.parseInt(reader.readLine()));
b = Math.abs(Integer.parseInt(reader.readLine()));
if (a <= 0)
throw new IllegalArgumentException();
else if (b <= 0)
throw new IllegalArgumentException();
int teiler = ggt(a, b);
System.out.println(teiler);
}
public static int ggt(int a, int b){
if (a == 0)
return b;
while (b != 0){
if (a > b)
a = a - b;
else
b = b - a;
}
return a;
}
}