...
This compliant solution ensures that all mathematical constants are declared as static-final
. Additionally, it provides read-only access to the constant by reducing its accessibility to private
and providing a getter an accessor method.
Code Block | ||
---|---|---|
| ||
private static final BigDecimal googol = BigDecimal.TEN.pow(100); public static BigDecimal getGoogol() { return googol; } |
...