> how do you convert an integer to BigIntger?? i thought it was just
> BigInteger(integer) but its not working... im sure ive done this before
> but i cant remember what i did...
http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html#valueOf(long)
Google is your friend.
> how do you convert an integer to BigIntger?? i thought it was just
> BigInteger(integer) but its not working... im sure ive done this before
> but i cant remember what i did...
How about BigInteger(integer.toString()); ?
Ed!
Daniel Pitts - 07 Nov 2006 00:30 GMT
> > how do you convert an integer to BigIntger?? i thought it was just
> > BigInteger(integer) but its not working... im sure ive done this before
[quoted text clipped - 3 lines]
>
> Ed!
Uh, lets think about this.
You have an int.
Wrap it into a Integer object.
Convert the Integer to a String object.
Ask BigInteger to parse the String object;
done.
Versus.
How about BigInteger.valueOf(integer);
You have an int.
Wrap it with a BigInteger object.
done.
Simon Brooke - 07 Nov 2006 10:19 GMT
>> how do you convert an integer to BigIntger?? i thought it was just
>> BigInteger(integer) but its not working... im sure ive done this
>> before but i cant remember what i did...
>
> How about BigInteger(integer.toString()); ?
Eeeeeww. No. Nonononnonono. Don't even go there.

Signature
simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
;; MS Windows: A thirty-two bit extension ... to a sixteen bit
;; patch to an eight bit operating system originally coded for a
;; four bit microprocessor and sold by a two-bit company that
;; can't stand one bit of competition -- anonymous