// demo of this, OC.this, and scope public class Memberclass2 { public static void main(String[] args) { new OC().new IC().print(); } } class OC { private int x = 1; private int y = 2; public class IC { private int x = 3; private int y = 4; public void print() { // 3 + 1 -> 4 System.out.println(this.x+OC.this.x); // 4 + 4 -> 8 System.out.println(y+this.y); } } }