pete please fix the currency question at bottome that one doesn't make sense
U2L05 - double
This lesson drills what Trevor teaches in U2L01, U2L02, U2L03, U2L04 and U2L05
So if some of this is confusing, be sure to review any of these 5 lessons, to clarify what is drilled below.
Pre-requirements:
- You have performed each of 2 previous drills to reach a top speed, and then repeated top speed 10x
- Follow this for all drills explainer
- Or this if you haven't even installed the drills yet installation
Errata/Corrections
- You may wish to think "Eclipse" where the lesson uses "JShell" - some similar but not same functionality, though.
- Where Trevor's video suggests BigInteger for currency values, this should have been BigDecimal instead.
Summary of what is Drilled
- Some things from previous lessons
- what is the product of an int divided by an int?
double is to float
asint is to long
- How to handle a float on the right side of an assignment
- How to handle a float on the left side of an assignment
- What happens if you mix left and right side float left right double
- Main point don't let java guess - be explicit both sides
** Not Drilled
- imprecision in last place and how to expect that
- errata BigDecimal not BigIteger for currency