Anonymous classes are useful when simple, one-off objects need to be created. They can be used in place of a full class definition.
They can everything a normal class can: pass arguments through to their constructors, extend other classes, implement interfaces, use traits.
Anonymous classes are as...