001package basics.inner.three; 002public class Main { 003 private Main() {} 004 static public void main (final String[] args) { 005 //stdlib.Trace.graphvizShowSteps (true); stdlib.Trace.run (); 006 C mc1 = new C(42); 007 C mc2 = new C(36); 008 mc1.f(); 009 mc2.f(); 010 } 011} 012 013interface Print { void print(); } 014 015class C { 016 int cx; 017 C(int x) { cx = x; } 018 void f() { 019 Print p = new Print() { 020 int py = 27; 021 public void print() { 022 System.out.println(" cx=" + C.this.cx + " py=" + this.py); 023 } 024 }; 025 p.print(); 026 } 027}