• + 1 comment

    y is it necessary to add "" while initializing the constructor of biginteger ?

    • + 2 comments

      Because BigInteger doesn't take int in its constructor but can take a string .So adding "" makes a integer , string .

      A nice way is to use valueOf() function of BigInteger class.

      • + 0 comments

        oh thank u

      • + 0 comments

        why not use:

        scn.nextBigInteger();
        

        directly?