Reputation: 10429
If I have a BigDecimal with value 6.54
, how do I convert that to an integer value of 654
? i.e. no decimal point.
intValue()
will just convert to 6.
Upvotes: 6
Views: 603
Reputation: 198471
BigDecimal.unscaledValue()
will return a BigInteger
with the value 654
. You could then call intValue()
to convert that to an int
, if you needed that specifically.
Upvotes: 12