permaculture playing cards*
The moose likes Beginning Java 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 » Java » Beginning Java
Bookmark "inner class" Watch "inner class" New topic
Author

inner class

Khurram Ajmeri
Greenhorn

Joined: Nov 24, 2001
Posts: 6
What class must an inner class extends?? :roll:
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
They don't have to extend anything (other than Object).


"I'm not back." - Bill Harding, Twister
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
They don't have to extend anything (other than Object).
Which is implicit if you don't specify a parent class.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
manju kumar
Greenhorn

Joined: May 29, 2002
Posts: 5
I think inner classes can extend any other classes. But there is no must and should that they have to extend some class.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
But there is no must ... that they have to extend some class.
Except, as Jim pointed out, the Object class. The Object class is always at the top of any class heirarchy. If you don't explicitly extend some class, then the compiler determines that you must want to extend the Object class directly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inner class