How to get biggest BigDecimal value

Caner picture Caner · Jul 22, 2011 · Viewed 86.2k times · Source

How can I get the largest possible value of a BigDecimal variable can hold? (Preferably programmatically, but hardcoding would be ok too)

EDIT
OK, just realized there is no such thing since BigDecimal is arbitrary precision. So I ended up with this, which is sufficiently big for my purpose:
BigDecimal my = BigDecimal.valueOf(Double.MAX_VALUE)

Answer

alexblum picture alexblum · Jul 22, 2011

Its an arbitrary precision class, it will get as large as you'd like until your computer runs out of memory.