I want to create an anonymous inner class that extends another class.
What I want to do is actually something like the following:
for(final e:lis
extends keyword only allow using in class definition. Don't allow in anonymous class.
Anonymous class define is: class without any name and don't use after declaration.
We have to correct your code as following(for example):
Callable test = new Callable()
{
@Override
public String call() throws Exception
{
return "Hello World";
}
};