Member Avatar

Hi there. Recently, i wrote a program that would return ridiculously high numbers as BigIntegers. The program is working at all, but when the BigIntegers get to a value that I have estimated to be around 2^329554, and takes up between 30-45 kilobytes, i get this error:

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.math.BigInteger.add(
    at java.math.BigInteger.add(

So, this is not really anything important, but I'm just cursious why it stops right there. Is it possible to have a number higher than this value, or is it the absolute highest number you can have in java? And is there any way go over this limit?

Recommended Answers

You couild try increasing the memory available to the JVM to avoid OutOfMemoryErrors...

Jump to Post

All 2 Replies

Member Avatar

How would I go about doing this in JCreator?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.