Question
What is Inheritance?
Answer
⢠Inheritance is the process by which objects of one class acquire the properties of objects of another class. ⢠A class that is inherited is called a superclass. ⢠The class that does the inheriting is called a subclass. ⢠Inheritance is done by using the keyword extends. ⢠The two most common reasons to use inheritance are: To promote code reuse To use polymorphism
š² Practice Offline on Mobile: Download the free QA Automation & SDET Prep app on Google Play & App Store.