> how would you convert an ordinary 'int' integer into a java BigDecimal?
> i
[quoted text clipped - 3 lines]
> do
> this?
int j = ...;
BigDecimal bd = new BigDecimal (j);
On Sat, 12 Nov 2005 13:01:07 GMT, "BemusedbyQM"
<groover892002@yahoo.co.uk> wrote, quoted or indirectly quoted someone
who said :
>how would you convert an ordinary 'int' integer into a java BigDecimal? i
>have a java line that produces random java integers in the range 1 - 9 and i
>want next to convert these integers into java BigDecimals. how would i do
>this?
Are you sure you don't want BigInteger?
If you did then new BigInteger( String ) will do it. You must convert
your int to String first. see
http://mindprod.com/applets/converter.html
for how.
If you want BigDecimal there is new BigDecimal ( int ). I am puzzled
why you had a problem with that one.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.