An anonymous class can either extend another class or implement a single interface. But not both, as you are trying to do.
Note that an anonymous class does not explicitly use "extends" or "implements." Instead, the instance of the anonymous class (defined by the body you include after the constructor call) is automatically upcast to the type of the class or interface that you specify after "new."
So you could do either of the following...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org