Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.
Understanding
- I can explain that an assignment evaluates the right side and then stores the value in the variable on the left. (Guide: “Assignment: evaluate on the right, store on the left”; Practice Question 1)
- I can explain what it means for a variable to be initialized and why it must be initialized before use. (Guide: “Initialization”; Practice Question 4)
- I can explain that an expression produces a single value that has a type. (Guide: “An expression has a value and a type”; Practice Question 5)
- I can say what
nullis and which kinds of variable can hold it. (Guide: “Reference types and null”; Practice Question 9) - I can say what
nextInt,nextDouble,nextandnextLinereturn. (Guide: the Scanner table)
Skills
- I can trace a sequence of assignments in a table, including
x = x + 1and statements using several variables. (Guide: Worked example 1; Practice Questions 2 and 7) - I can decide whether an assignment is type-compatible. (Guide: “An expression has a value and a type”; Practice Question 3)
- I can write code that reads values with a
Scannerand uses them in calculations. (Guide: Worked example 2; Practice Question 8) - I can predict the output of a program that mixes
nextIntandnextLine. (Guide: “The nextLine pitfall”; Practice Question 6)
Reasoning
- I can explain why changing one primitive variable later does not change another that was assigned from it. (Guide: “Common misconceptions”; Practice Questions 5 and 7)
- I can explain why
double d = a / b;can store a value without a fractional part. (Practice Questions 7 and 9) - I can say which input mistakes cause a run-time error (
InputMismatchException) rather than a compile-time error. (Guide: Worked example 2)
All ticked? Move on to the Topic 1.5 study guide, Casting and Range of Variables, or return to the course roadmap.