I am getting a incompatible types error from the following segment of code, I am calling my ExtendedEuclid class from the main program, my Extended Euclid class compiles just fine, but the one part in the main will not, it is the part towards the bottom where I am calling the extended euclid class and trying to pass the arguments... Here is some code snippets...

MY EXTENDED EUCLID CLASS...
import java.math.BigInteger;
public class ExtendedEuclid
{
public static BigInteger[] ExtendedEuclid(BigInteger a, BigInteger b, BigInteger c, BigInteger d, BigInteger e, BigInteger f)
{
BigInteger[] br = new BigInteger[]{a,e,f};
BigInteger[] ar = new BigInteger[]{b, a.mod(b), e.subtract(a.multiply(c).divide(b)),
f.subtract(a.multiply(d).divide(b)), c, d};
if(b.compareTo(BigInteger.ZERO) == 0)
{
return br;
}
else
{
return ar;
}
}
}

THE CODE FROM THE MAIN PROGRAM GIVING ME ERRORS...

import java.math.BigInteger;
import javax.swing.*;
import java.io.Serializable;
public class RSA
{
public static void main(String[] args)
{
MillerRabin MR = new MillerRabin();
BigInteger p = new BigInteger("0");
BigInteger q = new BigInteger("0");
BigInteger a = new BigInteger("1");
BigInteger b = new BigInteger("1");
BigInteger D = new BigInteger("1");
BigInteger gcd = new BigInteger("0");
BigInteger E = new BigInteger("1");
BigInteger c0 = new BigInteger("0");
BigInteger d1 = new BigInteger("1");
BigInteger f0 = new BigInteger("0");
Euclid findE = new Euclid();
ExtendedEuclid findD = new ExtendedEuclid();

do
{
p = MR.createPrime(512,100);

System.out.println("p = " + p + "\n");

for(int i = 1; i <=100; i++)
{
if(MR.isProbablePrime(p))
{
if(i == 100)
{
System.out.println("p IS a probable prime number\n");
}
}
else
{
System.out.println("p is NOT a Probable Prime Number\n");
break;
}
}

q = MR.createPrime(512,100);
System.out.println("q = " + q + "\n");

for(int i = 1; i <=100; i++)
{
if(MR.isProbablePrime(q))
{
if(i == 100)
{
System.out.println("q IS a probable prime number\n");
}
}
else
{
System.out.println("q is NOT a Probable Prime Number\n");
break;
}
}

}while(p == q);

BigInteger n = p.multiply(q);//value for n
BigInteger m = (p.subtract (a)).multiply(q.subtract (b));

while(E.compareTo(n) != 0)
{
E = E.add(BigInteger.ONE);
gcd = findE.GCD(E,m);//passing val E and m to GCD method
if(gcd.compareTo(BigInteger.ONE) == 0) break;
}

System.out.println("\n" + gcd + "\n");

do
{
BigInteger getD = findD.ExtendedEuclid(E,m,c0,d1,D,f0) //THIS IS THE ERROR HERE, SAYS INCOMPATIBLE TYPES
D = getD;
while(D.compareTo(BigInteger.ZERO) < 0)
{
D = D.add(m);
//checking if equation comes out to one
if(D.multiply(E.mod(m)).compareTo(BigInteger.ONE) == 1)
{
System.out.println("\n" + "D Does Equal One: CORRECT!" + "\n");
}else{
System.out.println("\n" + "D DOES NOT EQUAL ONE" + "\n");
}
}
}while(D.multiply(E.mod(m)).compareTo(BigInteger.ONE) == 0);

System.out.println("n = " + n + "\n");//prints value for n
System.out.println("m = " + m);//prints value for m
System.out.println("\nE = " + E + "\n");
System.out.println("D = " + D + "\n");

String userInput = JOptionPane.showInputDialog("Enter the string to encrypt");



}

}