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.
SCJP for J2SE 5.0 (beta)<br />SCJA (beta)
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Tony Morris:
An anonymous class is not implicitly final...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Tony Morris
Java Q&A (FAQ, Trivia)
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Tony Morris
Java Q&A (FAQ, Trivia)
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.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Tony Morris
Java Q&A (FAQ, Trivia)
"I'm not back." - Bill Harding, Twister
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?
Tony Morris
Java Q&A (FAQ, Trivia)
Tony Morris
Java Q&A (FAQ, Trivia)
"I'm not back." - Bill Harding, Twister
Beauty is in the eye of the tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|