I have to do some project with the Java class BigInteger. (Representation of Rational Numbers)
The first problem occurs when I try to import it.
I can use import java.math.*;
But as soon as I use import java.math.BigInteger;
the BigInteger gets marked red, and does not work anymore.
When importing it by math.* I cannot use any of the functions of BigInteger, like .valueOf or any other.
Had somebody already had this problem and found a solution?
My code so far:
import java.math.BigInteger;
public class Rational {
private BigInteger num; //Zähler, Nummerator
private BigInteger denom; //Nenner, denominator
public Rational (BigInteger num, BigInteger denom) {
this.num = num;
this.denom = denom;
}
}
Thanks to Nexevis.
It was as easy as that, stupid not to try this on my own.
Restarted IntelliJ and now it works fine.
Thanks to all the othery, trying to solve my problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With