Well there are a few different concepts being looked at in this problem. If you don't understand the concept of an abstract class, maybe
you should look at a simpler example first, before you go mixing it with anonymous inner classes and such. For example:
So what's happening here is that there is a toplevel class, called MyAbstractClass. It obviously is abstract. One of its methods is implemented (the getNum() method), and one of its methods is abstract (the getString() method).
So you can see here how this works, having a toplevel class abstract. In addition, if you have an abstract class, you MUST extend the class in order to use it, because you CANNOT implement an abstract class on its own. The point here is that whether the abstract class is the topmost class or somewhere down an inheritance tree, it is the parent of something, thus allowing it to be a toplevel class, just like what is demonstrated in this example.