What is the difference between superclass and subclass?
Printable View
What is the difference between superclass and subclass?
The super class is a class that is inherited,it is simple class generally.
The sub class is not inherited,it will inherit all the properties of super class,access all the methods variable of super class not vice versa.
subclass inherits all the properties of a Super class.
The superclass is the class from which the current class inherits. And The subclass is the class which inherits from the current class. Thanks!
____
code inspection tools
Subclasses, Superclasses, and Inheritance. To recap what you've seen before, classes can be derived from other classes. The derived class (the class that is derived from another class) is called a subclass. The class from which it's derived is called the superclass.
Subclasses, Superclasses, Also Legacy. On recap the thing that you've seen before, classes might make inferred from other classes. The inferred class (the class that is determined from in turn class) is called An subclass.
Super class refers to a high level class, which passes some kind of attribute and procedures. This is usually followed down to the hierarchy to subclasses. Most of the time abstract super classes are referred to as master structures and almost most of the time no objects are created for it.
On the other hand, a subclass is that inherits different kinds of specifications and also behaviors. This could also include methods, procedures and variables from any other class.
Every class have only one superclass and subclasses are derived all the fields, methods, etc., from it's superclass.
A class that is derived from another class is called a subclass (also a derived class, extended class, or child class). The class from which the subclass is derived is called a superclass (also a base class or a parent class).
A subclass derived all the field and methods from the Superclass.