Originally posted by Dhanesh Kumar:
hich of the follow are true statements.
a. An anonymous class can extend only the Object class.
b. An anonymous class can not implement an interface.
c. An anonymous class can be abstract.
d. An anonymous class is implicitly final.
e. An anonymous class can be static.
f. The class instance creation expression for an anonymous class must never include parameters.
g. An anonymous class must declare at least one constructor.
h. None of the above.
Originally posted by Tony Morris:
Are you saying that 'implicitly final' and 'implicity unsubtypable' mean exactly the same thing? If so, I strongly refute the statement.
For example, a top level class with all private constructors is also implicitly not 'subtypable',
I've seen you lambaste others for overlooking rule exceptions related to nested classes being able to access private members of the containing class, Tony. Getting sloppy?
While we're at it Tony, you might want to correct the compilation error in your AnonymousClassFinal class above, eh?