Troll dé Mage Troll dé Mage - 4 months ago 40
Java Question

A Variable That Doesn't Overflow

I've been working with some very big numbers lately, and it has gone to the extent where even my longs overflow. Is there any variable that never overflows?


Maybe you should use BigInteger, but is is a class type, not a variable.

BigInteger bi = BigInteger.valueOf(num);