Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What class must an inner class extend ? 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 "What class must an inner class extend ?" Watch "What class must an inner class extend ?" New topic
Author

What class must an inner class extend ?

josephine chen
Ranch Hand

Joined: Oct 29, 2002
Posts: 216
What class must an inner class extend ?
A. The top level class ---- does it mean static inner class ??
B. The Object class //yes
C. Any class or interface //yes
D. it must extend an interface //no
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
"Must"? and, "Directly"? or indirectly?



It must extend Object or any other class. If it implements an interface only (like in an anonymous class), then it implicitly extends the class Object.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
shan
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!


Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What class must an inner class extend ?