Possible Duplicate:
How are Anonymous (inner) classes used in Java?
I just discovered the following feature while reading through Java Puzzlers
public class Main {
public static void main(String[] args) {
new Object() {
void helloWorld() {
System.out.println("Hello world!");
}
}.helloWorld();
}
}
And I find this amazingly handy. Very closure-like. The problem is that I can't find any information on this construct. Can anyone provide me with a link describing this feature?