Skip to content

Instantly share code, notes, and snippets.

Created September 2, 2014 15:38
Show Gist options
  • Save anonymous/971d1692126d3f35a611 to your computer and use it in GitHub Desktop.
Save anonymous/971d1692126d3f35a611 to your computer and use it in GitHub Desktop.
test
public class AnonClass {
private String name = "hello";
public static void main(String [] args ){
AnonClass.getAnonClass().printThis();
}
public static Test getAnonClass(){
return new Test() {
private int a = 100;
public void printThis(){
System.out.println(" a " + this.a );
}
};
}
}
interface Test {
public void printThis();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment