What is inheritance with real time example?

For instance, we are humans. We inherit certain properties from the class ‘Human’ such as the ability to speak, breathe, eat, drink, etc . We can also take the example of cars. The class ‘Car’ inherits its properties from the class ‘Automobiles’ which inherits some of its properties from another class ‘Vehicles’.

Sizin İçin Seçtik  What is the output of the Java program public class Animal?

Leave a Reply

Your email address will not be published. Required fields are marked *

What is inheritance with real time example?

For instance, we are humans. We inherit certain properties from the class ‘Human’ such as the ability to speak, breathe, eat, drink, etc . We can also take the example of cars. The class ‘Car’ inherits its properties from the class ‘Automobiles’ which inherits some of its properties from another class ‘Vehicles’.

Sizin İçin Seçtik  What is ESP in networking?

Leave a Reply

Your email address will not be published. Required fields are marked *