Jayavardhan geepi wrote:
Is independent anonymous class possible? I mean , an anonymous class that neither extend any class nor implement any interfaces...
No. In the end there is always java.lang.Object as the root of every class hierarchy. But you can make anonymous subclasses of Object. The only thing is, unless you override equals, hashCode, toString or finalize this anonymous subclass will be pointless. Overriding clone is senseless as the class wouldn't implement Cloneable, and all other methods are final. Without overriding any of these 4 methods your anonymous subclass will behave exactly like Object itself.