What is inheritance in oops with real time example?

OOP is all about real-world objects and inheritance is a way of representing real-world relationships . Here’s an example – car, bus, bike – all of these come under a broader category called Vehicle. That means they’ve inherited the properties of class vehicles i.e all are used for transportation.

Sizin İçin Seçtik  What is inheritance with an example?

Leave a Reply

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