java中的大整数输入

java中的大整数输入,java,Java,可能重复: 我需要使用获取并操作整数输入,该类是大整数的良好起点 我必须检查文档,看看biginger的上限是多少,但它应该适合您的需要。对于大整数来说,这个类是一个很好的起点 import java.math.BigInteger; public class BigIntegerExample { public static void main(String[] args) { BigInteger bigInteger1 = new BigInteger

可能重复:

我需要使用获取并操作整数输入,该类是大整数的良好起点

我必须检查文档,看看
biginger
的上限是多少,但它应该适合您的需要。

对于大整数来说,这个类是一个很好的起点

import java.math.BigInteger;
public class BigIntegerExample 
{
    public static void main(String[] args) 
    {
       BigInteger bigInteger1 = new BigInteger ("123456789");
       BigInteger bigInteger2 = new BigInteger ("112334");
       BigInteger bigIntResult = bigInteger1.multiply(bigInteger2); 
       System.out.println("Result is  ==> " + bigIntResult);
    }
}
我必须检查文档,看看
biginger
的上限是多少,但它应该适合您的需要

import java.math.BigInteger;
public class BigIntegerExample 
{
    public static void main(String[] args) 
    {
       BigInteger bigInteger1 = new BigInteger ("123456789");
       BigInteger bigInteger2 = new BigInteger ("112334");
       BigInteger bigIntResult = bigInteger1.multiply(bigInteger2); 
       System.out.println("Result is  ==> " + bigIntResult);
    }
}
您可以使用Biginteger类获取整数中的长值


您可以使用Biginteger类获取整数中的长值。

否,实际上输入数据约束已获得。:)对不起,我想在谈论大数字时,给出上限而不是下限似乎很奇怪。不,实际上输入数据约束是正确的。:)对不起,我想在谈论大数字时,用上限而不是下限似乎很奇怪。请多注意缩进,阿披实古玛。谢谢先生,我以后会记住这件事。请多注意缩进,阿披实古玛。谢谢先生,我以后会记住这件事。