When working with arithmetic operations using int or
long, if the value becomes larger than 64 bits which is the size of a long then
java takes only the low order 32 (64 for longs) bits ignoring the rest. Just
have an attention, here java doesn't generate any error but produce the result
which is not correct. BigInteger in "java.math" package is made to
store large results. It provides a number of methods for doing arithmetic with
them.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Java Biginteger
Post your Comment