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(BigInteger.java:1075)
    at java.math.BigInteger.add(BigInteger.java:1048)

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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.