📅  最后修改于: 2022-03-11 14:52:35.583000             🧑  作者: Mango
// Primitive int
int myInt = 10
BigInteger bigInt = BigInteger.valueOf(myInt);
// Integer object
Integer integer = Integer.valueOf(myInt);
BigInteger bigInt = BigInteger.valueOf(myInteger.intValue());
bigInt = BigInteger.valueOf(myInteger); // works too