Is there anyway to convert from
double value to
double doubleValue = 64654679846513164.2; BigInteger bigInteger = (BigInteger) doubleValue;
I try to cast it but it didn’t work.
If you want to store the integral part of the double into a
BigInteger, then you can convert it into a
BigDecimal and then into a
BigInteger k = BigDecimal.valueOf(doubleValue).toBigInteger();