What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?
Anonymous inner class can be beneficial while giving different implementations for different objects. But should be used very sparingly as it creates problem for program readability.