| preferred AP College board partner for AP classes
AP Computer Science A/Unit 2: Using Objects
Start Practice Test
Share
medium Solved by 3 students
Data Type For Precise Decimal Arithmetic
< Prev
Next >

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

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1kaisuki11 0m 00s 100
#2lsj0803092211 0m 12s 88
#3richa.tuli02 2m 35s -175
APFIVE © 2020.
Email: [email protected]|Privacy Policy