I understand that both java.lang.Long
and java.math.BigInteger
can hold very large natural numbers.
I also know Long's max value, but what is the max value for BigInteger?
And aside from capacity, would BigInteger ever perform better when working with generally large integers that still fall in Long's range?
Question
Is the only consideration: is my value too large for Long?
See Question&Answers more detail:os