集册 Java实例教程 使用Scanner从控制台读取biginger

使用Scanner从控制台读取biginger

欢马劈雪     最近更新时间:2020-01-02 10:19:05

472
使用扫描仪从控制台读取BigInteger

import java.util.Scanner;

import java.math.BigInteger;

/** 
来 自 
时代Java公众号 - nowjava.com
**/

public class BigIntegerInputOutput {


    public static void main(String cLA[]) {


        Scanner myInput = new Scanner(System.in);


        BigInteger aBigNumber = myInput.nextBigInteger();

        System.out.printf("%d\n", aBigNumber);

    }

}