This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Subclass Vs Superclass Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Subclass Vs Superclass" Watch "Subclass Vs Superclass" New topic
Author

Subclass Vs Superclass

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
hi,
What is difference between subclass and superclass?
Thanks in advance,
Angela
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Here is a very simple example...

In this example, when you speak of "Father", "Grandfather" is the superclass. It's the class that Father inherits from. In this example, any objects of type Father have both GFMethod and FMethod.
When you speak of "Grandfather", "Father" is the subclass.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Subclass Vs Superclass
 
Similar Threads
general question
Protected Method access
what's the difference of these two statements?
why fields can't be overidden?????
how makeChild classes as Non Serializable if parent class is Serializable in java ?