Read BigInteger from console using Scanner - Java File Path IO

Java examples for File Path IO:Scanner

Description

Read BigInteger from console using Scanner

Demo Code

import java.util.Scanner;
import java.math.BigInteger;

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);
    }//from   w w w  .j  ava 2  s . co  m
}

Related Tutorials