1// Primitive int
2int myInt = 10
3BigInteger bigInt = BigInteger.valueOf(myInt);
4// Integer object
5Integer integer = Integer.valueOf(myInt);
6BigInteger bigInt = BigInteger.valueOf(myInteger.intValue());
7bigInt = BigInteger.valueOf(myInteger); // works too