You are viewing a single comment's thread. Return to all comments →
y is it necessary to add "" while initializing the constructor of biginteger ?
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.
oh thank u
why not use:
scn.nextBigInteger();
directly?
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Fibonacci Modified
You are viewing a single comment's thread. Return to all comments →
y is it necessary to add "" while initializing the constructor of biginteger ?
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.
oh thank u
why not use:
directly?