aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ///inner class/// Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "///inner class///" Watch "///inner class///" New topic
Author

///inner class///

chao-long liao
Ranch Hand

Joined: Jul 29, 2001
Posts: 78
JohnJuntMockExam...
What class must an inner class extend:
a.The top level class
b.The Object class
c.Any class or interface
d.It must extend an interface
Select the most appropriate answer.
my answer is b,but the answer is c ???
can somebody tell me why ???
the answer is wrong ??
liao
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055

my answer is b,but the answer is c ???
can somebody tell me why ???

The question was: "What class must an inner class extend." An inner class is not forced to extend Object.
Also, an inner class need not extend the enclosing class, nor an interface (though it can, if wants to).
chao-long liao
Ranch Hand

Joined: Jul 29, 2001
Posts: 78
The question was: "What class must an inner class extend." An inner class is not forced to extend Object.
Also, an inner class need not extend the enclosing class, nor an interface (though it can, if wants to).

Thanks,I can get what you say,but how about c,
inner class "must" extend any class or interface??
So we can say it's not a good question,right ?
It's ambiguous.
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
You are right there
Thiru Thangavelu
Ranch Hand

Joined: Aug 29, 2001
Posts: 219
I guess the question expects the answer about anonymous inner class where it must extend a class or implememt an interface(though it is not mentioned there).
[ June 20, 2002: Message edited by: Thiru Thangavelu ]

Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ///inner class///