February 2014
Beginner
1248 pages
62h 25m
English
• Scope (p. 222) is the portion of the program in which an entity, such as a variable or a method, can be referred to by its name. Such an entity is said to be “in scope” for that portion of the program.
• The scope of a parameter declaration is the body of the method in which the declaration appears.
• The scope of a local-variable declaration is from the point at which the declaration appears to the end of that block.
• The scope of a local-variable declaration that appears in the initialization section of a for statement’s header is the body of the for statement and the other expressions in the header.
• The scope of a method or field of a class is the entire body of the class. This enables a class’s methods ...
Read now
Unlock full access