File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Subclass Vs Superclass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Subclass Vs Superclass" Watch "Subclass Vs Superclass" New topic

Subclass Vs Superclass

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
What is difference between subclass and superclass?
Thanks in advance,
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:
subject: Subclass Vs Superclass
jQuery in Action, 3rd edition