+ 2
as far as i know there is a limitation for numbers in java. how to assign bigger numbers in java
there is a maximum no. which we can assign to an integer in java what if we need more no. (Example int a = 9999999999999999999999999;) this is not supported in java what to do if i need to work on lager no.like the eg. one.
7 Antworten
+ 16
Sir @Krishna had written the code for big integer. check it out :
https://code.sololearn.com/WS60ll19CFej/?ref=app
+ 10
Thanks @Agus Mei.
@shobhit : BigInteger is explained in the code linked by @Agus. There are example programs too.
+ 10
use long keyword instead of int
+ 9
you are using primitive datatype to store int you can also store integer value in reference datatype which you can create urself
+ 2
you can use BigInteger
+ 2
can u give any example how to use it
+ 2
@sam i have tried long but long does something else it does 64bit computation.