the GCD method has to be a recursive method ( use GCD within a GCD method).
public int GCD(int a, int b) {
int intP = a, intQ = b;
while (intP % intQ !=0) {
int intR = intP % intQ;
intP = intQ; intQ = intR;
}
Return GCD ( intP, intQ);
}
and I do not think the method has to be static method.