AP® Computer Science A glossary
Scope
Also called: variable scope
Course: AP® Computer Science A Shows up in: Unit 3: Class Creation
The part of a program where a variable can be used, set by the block in which the variable is declared.
Appears in the course and exam description (CED): 3.8.A.13.8.A.2
A block is code between braces. A variable declared in a loop header or body cannot be used after the loop. When a local variable and an instance variable share a name, the local one is used inside its block.
Learn it properly, with a checkpoint 3.8 Scope and Access