answersLogoWhite

0

Class B is said to be a "subclass" of class A.

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

What does inherited features mean?

Java: In Java inherited features for a class are the variables and methods that are inherited from its parent class.Ex: public class A extends B {...}Here class A has access to the variables and methods in class B. This is termed as inheriting features.General: In general, inherited features are termed as the characteristics and other aspects of a person that resemble his parents or other family members. For example a boy may have blue eyes like his mother or may have a long nose like his father etc. These are termed as inherited features.


What is the difference between the direct and indirect base class?

Direct base classes are those that are specified in a derived class' inheritance declaration. Indirect base classes are those that are inherited via the direct base classes. class A{}; class B : public A{}; class C : public B{}; With respect to C, B is direct while A is indirect. With respect to B, A is direct.


What are the things not inherited from parent class in Java?

Private members are not inherited from the parent class.


Can private members of a class be inherited?

All fields and methods of a class are inherited: public class A {private int x =10;public int XVal{get{return x;}}} public class B:A {public B(){x = 20;}}


Does Every class has a toString method and an equals method inherited from the Object class?

Yes - in Java, every class has this method, which is inherited from the Object class. Often, the inherited method does nothing particularly useful, but you can override it with your own implementation.

Related Questions

What does inherited features mean?

Java: In Java inherited features for a class are the variables and methods that are inherited from its parent class.Ex: public class A extends B {...}Here class A has access to the variables and methods in class B. This is termed as inheriting features.General: In general, inherited features are termed as the characteristics and other aspects of a person that resemble his parents or other family members. For example a boy may have blue eyes like his mother or may have a long nose like his father etc. These are termed as inherited features.


What is the difference between the direct and indirect base class?

Direct base classes are those that are specified in a derived class' inheritance declaration. Indirect base classes are those that are inherited via the direct base classes. class A{}; class B : public A{}; class C : public B{}; With respect to C, B is direct while A is indirect. With respect to B, A is direct.


What are the things not inherited from parent class in Java?

Private members are not inherited from the parent class.


What is the Difference between multiple inheritance and multilevel inheritance in asp.net?

Multiple inheritance, as the name 'multiple' suggests, is one where more than one(multiple) super class is inherited by one sub-class. It can be represented as:A B C\ | /DOn the other hand, in case of multilevel inheritance; the superclass is inherited by a sub-class which is in turn inherited by another class leading to the different level. It can be represented as:A|B|CHowever in asp, multiple inheritance is not supported.


Can private members of a class be inherited?

All fields and methods of a class are inherited: public class A {private int x =10;public int XVal{get{return x;}}} public class B:A {public B(){x = 20;}}


Does Every class has a toString method and an equals method inherited from the Object class?

Yes - in Java, every class has this method, which is inherited from the Object class. Often, the inherited method does nothing particularly useful, but you can override it with your own implementation.


Any class may be inherited by another class in the same package?

false sealed classes cannot be inherited


How do you explain inheritance in java?

This is a complicated topic; you should read tutorials or lessons that explain this in detail. But briefly, if a class "B" inherits from a class "A", the inherited class ("B") has all the features of the "parent" class ("A"); you can then start adding additional features. This is great for code reuse - that is, reducing the amount of repeated code.


What is a behavior that is inherited called?

It is called an inherited trait


What is behavior is that is inherited called?

It is called an inherited trait


What is a sub class?

In object oriented programming approach subclass is derived from parent class. This term is generally used in concept called "Inheritance" Example [PHP] class A { //class A definition } class B extends A { //class B definition } In above example class A is parent class and class B is subclass/child class .


What is sub classes?

In object oriented programming approach subclass is derived from parent class. This term is generally used in concept called "Inheritance" Example [PHP] class A { //class A definition } class B extends A { //class B definition } In above example class A is parent class and class B is subclass/child class .