SE450: Scope: Hiding [9/47] Previous pageContentsNext page

What is scope?

What is hiding (occlusion)?

What is visibility?

class C {
  int i;
  float f;          
  void m(int f) {
    // field f is hidden
    for (int i = f; i--; i>0) {
       // field i is hidden
    }
  }
}

Previous pageContentsNext page