Money is where floating point fails first. 0.1 + 0.2 isn't 0.3 as a double, and new BigDecimal(2.675) quietly holds 2.67499 because it starts from a double. Production Java uses BigDecimal built from text, with the rounding rule written out every time a scale changes.
BigDecimal has its own traps. equals compares the scale too, so 2.0 and 2.00 are different keys in a HashSet, while compareTo says they are the same amount. Rounding mode is a business rule: HALF_UP on an invoice, sometimes HALF_EVEN in banking. And dividing money leaves remainders that must go somewhere, or a split bill loses a cent.
These tasks build those rules into small methods with tests on the exact cents.
equals compares scale; compareTo compares value.