File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Convert an int to a BigInteger Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert an int to a BigInteger" Watch "Convert an int to a BigInteger" New topic

Convert an int to a BigInteger

Steve Watson
Ranch Hand

Joined: Apr 08, 2003
Posts: 38
How do I convert an int to a BigInteger?
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
String s = Integer.toString( 3 ); // convert the int to String
BigInteger big = new BigInteger( s );

[ August 05, 2004: Message edited by: Joyce Lee ]
I agree. Here's the link:
subject: Convert an int to a BigInteger
Similar Threads
Help! Question on converting String to BigInteger
Converting long hexadecimal strin to decimal
convert BigInteger to integer
int to BigInteger
sum of two int arrays