1.

Can An Anonymous Class Define Method Of Its Own?

Answer»

YES. But there will be no way by which the methods defined in the anonymous class which are not present in its SUPERCLASS be INVOKED. As only those methods which are defined in the superclass which the anonymous class extends be invoked. HENCE defining the methods in the anonymous class will be of no USE.

Yes. But there will be no way by which the methods defined in the anonymous class which are not present in its superclass be invoked. As only those methods which are defined in the superclass which the anonymous class extends be invoked. Hence defining the methods in the anonymous class will be of no use.



Discussion

No Comment Found