BigInteger.valueOf(long val) has the following syntax.
public static BigInteger valueOf(long val)
In the following code shows how to use BigInteger.valueOf(long val) method.
/* w w w. jav a 2 s .c o 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.