J
Jeremy Watts
I am trying to convert a BigDecimal number to a BigInteger one. I have
truncated the number to its nearest whole integer firstly, before converting
it to a string and then converting that to a BigInteger.... but the
compilers coming back with an error message "Number Format Exception".
Cant see what I'm doing wrong here... The number I'm using for the
BigDecimal is
'465836768828.000' . Is it the ".000" bit thats messing things up here?
How would I remove that so that I'm left with 465836768828 ?
Or is there a better way of converting between the two?
Thanks
truncated the number to its nearest whole integer firstly, before converting
it to a string and then converting that to a BigInteger.... but the
compilers coming back with an error message "Number Format Exception".
Cant see what I'm doing wrong here... The number I'm using for the
BigDecimal is
'465836768828.000' . Is it the ".000" bit thats messing things up here?
How would I remove that so that I'm left with 465836768828 ?
Or is there a better way of converting between the two?
Thanks