Large Numbers Requiring More than 64 bit Representation

Ashwin picture Ashwin · Apr 7, 2012 · Viewed 25.9k times · Source

I am using java and have to deal with numbers larger than long (which is 64 bits). What should I use? What is the size of BigInteger in java?

Answer

Mark Byers picture Mark Byers · Apr 7, 2012

As you mentioned in your question, you should use BigInteger.

They can be as large as you need - until you run out of memory.