How to get biggest BigDecimal value
问题 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 good for my purpose: BigDecimal my = BigDecimal.valueOf(Double.MAX_VALUE) 回答1: Its an arbitrary precision class, it will get as large as you'd like until your computer runs out of memory. 回答2: Looking at the source BigDecimal