This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert an int to a BigInteger" Watch "Convert an int to a BigInteger" New topic
Author

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 );

Joyce
[ August 05, 2004: Message edited by: Joyce Lee ]
 
GeeCON Prague 2014
 
subject: Convert an int to a BigInteger