| Author |
Inner class concept
|
Shaili Merchant
Greenhorn
Joined: Nov 20, 2007
Posts: 27
|
|
I came across this question in IBM mock test. 14) Which of the following statements is true? a) An interface can contain a nested top-level inner class. b) An interface can contain a member inner class. c) A member inner class can implement an interface. d) A static method can contain a local class. e) A static method can contain a nested top-level class. My answer : b c d Just wanted to confirm whether my answer is correct or not. Thanks.
|
 |
Kelvin Chenhao Lim
Ranch Hand
Joined: Oct 20, 2007
Posts: 513
|
|
This question uses rather unusual terminology. There's no such thing as a "nested top-level class" or "nested top-level inner class"; these are basically self-contradictory terms. However, if we assume that A and E are just referring to "static nested classes", then I believe the answer is A C D. Note that all member classes within an interface are implicitly static. [ December 06, 2007: Message edited by: Kelvin Lim ]
|
SCJP 5.0
|
 |
Shaili Merchant
Greenhorn
Joined: Nov 20, 2007
Posts: 27
|
|
Thanks Kelvin.. I was doubtful between choosing option a and b only. [ December 06, 2007: Message edited by: Shaili Merchant ]
|
 |
 |
|
|
subject: Inner class concept
|
|
|