Skip to content
Marlbridge

AP® Computer Science A · Unit 3 · Topic 3.8

Scope and Access: Topic Checklist (Computer Science A 3.8)

Specific I can statements for scope and access in Java, covering local variables, parameters, blocks and shadowing, each linked to the guide section or practice question that tests it.

Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions; see also the revision notes.

Understanding

  • I can say that a local variable can be used only in the block where it is declared. (Guide: “Local variables”; Practice Question 1)
  • I can explain why parameters are local variables and cannot be public or private. (Guide: “Local variables”; Practice Question 2)
  • I can say where instance variables and class variables can be used. (Guide: “Instance variables and class variables”; Practice Question 7)
  • I can explain what a block is. (Guide: “Local variables”; Practice Question 7)

Skills

  • I can state the scope of each variable in a method with nested blocks. (Guide: Figure 1; Practice Question 7)
  • I can find the cannot-find-symbol errors in code that uses a variable outside its block. (Guide: Worked example 2; Practice Question 5)
  • I can trace code in which a parameter or local variable hides an instance variable. (Guide: Worked example 1; Practice Questions 4 and 6)
  • I can repair a constructor that contains name = name. (Guide: “When two variables share a name”; Practice Question 8)

Reasoning

  • I can explain why a buggy constructor leaves instance variables at their defaults. (Guide: “When two variables share a name”; Practice Questions 3 and 8)
  • I can explain why a changed local variable does not change an object’s state. (Guide: Worked example 1; Practice Question 9)
  • I can tell the difference between scope and public or private access. (Guide: “Common misconceptions”)

All ticked? Move on to the Topic 3.9 study guide, this Keyword, 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.