Skip to content
Marlbridge

AP® Computer Science A · Unit 1 · Topic 1.4

Assignment Statements and Input: Checklist (Computer Science A 1.4)

A self-check list for assignment statements, initialization, compatible types, null and Scanner input, linked to the guide sections and practice questions.

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 null is and which kinds of variable can hold it. (Guide: “Reference types and null”; Practice Question 9)
  • I can say what nextInt, nextDouble, next and nextLine return. (Guide: the Scanner table)

Skills

  • I can trace a sequence of assignments in a table, including x = x + 1 and 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 Scanner and uses them in calculations. (Guide: Worked example 2; Practice Question 8)
  • I can predict the output of a program that mixes nextInt and nextLine. (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.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.