class Human
Parent class or base class or super class
{
void work()
{
System.out.println("Human can work");
}
base class
void eat()
{
System.out.println("Human can eat");
} Child class or sub class or
Parent class or super class or
derived class
}
public class Enginner extends Human
{
keyword
public static void main(String[] args)
{
Enginner E=new Enginner();
E.work();
E.eat();
}
}
OUTPUT
I want explanation for this program in java inheritance
Answers
Answered by
0
Answer:
jejrbkkebr kejnene. RCB
Similar questions