Skip to content
Ravnary
A Knowledge Platform
Categories
Learn
Cheatsheets
Paths
Favourites
Review
Community
Colour theme
Light
Dark
System
Learn
Java
The Language
Variables and Types
Quiz
Q 01
/ 05
Intermediate
Question 1 of 5. 0 correct, 0 incorrect.
A billing system stores the amount on each invoice line, and the lines are summed, discounted by a percentage, and taxed. Which type should hold the amount?
float
, because the values are small and it uses half the memory
BigDecimal
, built from a string
long
, holding the number of pence
double
, because the amount has a decimal point in it
Check answer
Home
Learn
Paths
Saved
Community