Troll dé Mage Troll dé Mage - 1 year ago 120
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?

Answer Source

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

BigInteger bi = BigInteger.valueOf(num);

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download