posted 21 years ago
HI all,
One of the questions from Mock exam :
Please select true statement(s) for an anonymous inner class
A) An anonymous class can not extend to a superclass
B) An anonymous class can not implement an interface
C) An anonymous class can extend to a superclass and implement an interface both.
D) An anonymous class can extend to a superclass or implement an interface
According to me the answer to this question should be A,B. But in answers to this mock the right answer is given as D.
HOw can anonymous class extend a class or implement a interface as this type of class dont have class name?
Thanks in advance
Regards,
Harry