Created
September 2, 2014 15:38
-
-
Save anonymous/971d1692126d3f35a611 to your computer and use it in GitHub Desktop.
test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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