Tick each line when you can do it without looking at the guide. Each line names where it is taught and tested. Revisit the study guide for anything you cannot yet do.
Understanding
- ☐ I can explain why Java has wrapper classes and give the example of ArrayList (study guide: Why a primitive needs a wrapper).
- ☐ I can state that Integer and Double are immutable and what that means for
n++(study guide: Other behaviours to know; practice: Question 5). - ☐ I can say which package holds Integer and Double and that no import is needed (study guide: Why a primitive needs a wrapper).
- ☐ I can distinguish autoboxing from unboxing (practice: Question 1).
Skills
- ☐ I can trace code that mixes int, Integer, double and Double and give each final value (study guide: Worked example 1; practice: Question 8).
- ☐ I can use
Integer.parseIntandDouble.parseDoubleto turn Strings into numbers (study guide: Turning a String into a number; practice: Questions 3 and 7). - ☐ I can write a method that parses an array of Strings and sums or averages it (study guide: Worked example 2; practice: Questions 9 and 10).
- ☐ I can predict the result of integer division on Integer objects (practice: Question 2).
Reasoning
- ☐ I can predict which declarations do not compile, such as
Double d = 7;(practice: Question 4). - ☐ I can predict when a
NumberFormatExceptionis thrown (study guide: Turning a String into a number; practice: Question 10). - ☐ I can predict a
NullPointerExceptionfrom unboxingnull(practice: Question 6). - ☐ I can explain why
==is unreliable for comparing wrapper objects and what to use instead (study guide: Other behaviours to know).
Next: Topic 4.8 ArrayList methods.