| <<< Attribute Visibility | Index | Method scope and attribute names >>> |
Local attributes are invisible outside of the scope of an operation.
Scope of operation is defined by execution entering /exiting the operation.
Lifetime of local attribute is limited to the duration of a call.
In Java and C++ scope is delineated by pairs of matching curly braces: { }
// Java code:
public class Number {
public void method1() {
int count;
}
public void method2() {
}
}
| <<< Attribute Visibility | Index | Method scope and attribute names >>> |