I'm still rather new to anonymous classes could anyone explain to me why this doesn't work?
List<String> instanceOfAnonymousClass = new ArrayList<string>(){
public void printSomething(){
System.out.println("something");
};
};
instanceOfAnonymousClass.printSomething();
Eclipse says
"The method printSomething() is undefined for the type
List<String>
"
So it won't even compile