How to inherit class in Java progamming
[B]Question asked by visitor sagar reddy[/B]
Printable View
How to inherit class in Java progamming
[B]Question asked by visitor sagar reddy[/B]
For extending a class in java programming, u should make use of 'extends' keyword.
Ex: ClassA is the class which u would like to inherit in ClassB. Code is as follows
//CODE
public class ClassB extends ClassA {
Note: we cannot inherit more than one class at a time in Java. For this we must go for multilevel inheritance.