Write the general syntax of inheritance.

Java Programming Language >   Inheritance in java >   Inheritance in Java (IS-A)  

Short Question

790


Answer:

To inherit a class we use extends keyword. Here class XYZ is child class and class ABC is parent class. The class XYZ is inheriting the properties and methods of ABC class.

class XYZ extends ABC
{
...
...

}


This Particular section is dedicated to Question & Answer only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.