📜  java int to biginteger - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:35.583000             🧑  作者: Mango

代码示例1
// 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