Java BigInteger.valueOf(long val)
Syntax
BigInteger.valueOf(long val) has the following syntax.
public static BigInteger valueOf(long val)
Example
In the following code shows how to use BigInteger.valueOf(long val) method.
/*from ww w . j a v a 2s. co m*/
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
Long l = new Long(123456789L);
BigInteger bi = BigInteger.valueOf(l);
System.out.println(bi);
}
}
The code above generates the following result.