Module 6
Numbers and money
Locale-aware parsing, exact decimals, units, separate currencies and explicit rounding.
Exact decimals for money
Parse amounts into exact decimals, reject text that would need rounding, and compare thresholds precisely. · 8 min
Negative amounts in accounting notation
Parse negatives written with a minus sign, parentheses or a trailing minus, only as the rules allow. · 7 min
Totals per currency
Aggregate amounts per currency and never add different currencies together. · 6 min
Rounding on purpose
Round only where a rule says so, with a declared mode, and never silently during casting. · 6 min
Module 6 quiz
Practice questions: choose an answer and check it to see the explanation. Nothing here is timed or graded.