This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inner class concept

 
Shaili Merchant
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 513
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Shaili Merchant
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kelvin..
I was doubtful between choosing option a and b only.
[ December 06, 2007: Message edited by: Shaili Merchant ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic