Data Type For Precise Decimal Arithmetic
Identify the most appropriate data type category for a particular specification.
A banking application needs to store account balances that include cents (like $1,234.56). The application must perform interest calculations that can result in fractional cents and requires exact decimal arithmetic with no rounding errors. Which data type is most appropriate for this specification?
A
boolean
B
BigDecimal (reference type)
C
int
D
double
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | kaisuki | 1 | 1 | 0m 00s | 100 |
| #2 | lsj08030922 | 1 | 1 | 0m 12s | 88 |
| #3 | richa.tuli | 0 | 2 | 2m 35s | -175 |
APFIVE