public class AnonymousInterfaceTest {
  AnonymousInterfaceTest() {
    go(  
       new Printable() {
         private String data = new String("XYZ"); 
         public void printAll() {
           System.out.println("Data is: " + data);
         }
       } 
       );
  }  
  public void go(Printable x) {
    x.printAll();
  }
  public static void main(String[] args) {
    new AnonymousInterfaceTest();
  }
}