Anonymous objects are the objects that are instantiated but are not stored in a reference variable.
In the example below, when a key is button(referred by the btn) is pressed, we are simply creating anonymous object of EventHandler class for just calling handle method.