BigDecimal
BigDecimal is a class in the Java standard library, java.math.BigDecimal, used for representing and performing arithmetic on decimal numbers with arbitrary precision. It provides exact decimal representation and arithmetic, making it suitable for financial calculations where floating point errors are unacceptable.
A BigDecimal stores its value as an unscaled BigInteger and a scale. The numeric value equals unscaledValue
Operations include add, subtract, multiply, and divide. Division methods may require a scale and rounding mode
Construction: the preferred way is to create a BigDecimal from a ASCII decimal string to avoid binary
Performance and scope: BigDecimal provides exact arithmetic at the cost of speed and memory compared to primitive