我正在尝试将TextInput
转换为10000000000000000000000000000000
。
但它没有转变。
我的代码是
BigInteger
显示BigInteger number = BigInteger.valueOf(10000000000000000000000000000000);
。
有没有办法转换这个数字,因为我必须在我的程序中使用这个数字作为整数?
答案 0 :(得分:4)
BigInteger的重点是支持数字long
和int
不能这样,你不能使用它们。你可以做的是使用一个字符串。
BigInteger bi = new BigInteger("10000000000000000000000000000000"):