Public? Static electricity Invalid? main(String[]? args)? {
BigInteger? Bi? =? New? BigInteger( 100, new? random());
System.out.println(bi? +? "? Is it? Even? :?" ? +? isEven(bi));
}
Public? Static electricity Bull? isEven(BigInteger? bi)? {
BigInteger? bi_2? =? big integer . value of(2);
BigInteger? bi_0? =? Big integer. Zero;
Return? Bi. Remainder (bi_2). equals(bi _ 0);
}
} Two errors:
Remainder requires a parameter of type BigInteger, and int is not a subclass of BigInteger.
Comparisons between objects need to use equals instead of = =.