INEHRITANCE IN JAVA PROGRAMMING!
Inheritance is one of the most important characteristic of object oriented programming language. It is the mechanism by which one class access the property like variable or field and method of another class. The class which inherits the main class is called Derived Class and which gets inherited is called Derived Class. The following is the simple example of inheritance in which class Division and Multiplication access the field of Calculation Class and then calculates the multiplication and division.
package Inheritance;
public class MainClass {
public static void main(String[] args) {
Multiplication mul= new Multiplication();
Division div= new Division();
mul.value(10, 5);
div.value(10, 5);
System.out.println(mul.multiply());
System.out.println(div.divide());
}
}
package Inheritance;
public class Calculation {
protected int a;
protected int b;
public void value(int m, int n){
a=m;
b=n;
}
}
package Inheritance;
public class Multiplication extends Calculation {
public double multiply() {
return (a*b);
}
}
package Inheritance;
public class Division extends Calculation {
public double divide() {
return (a/b);
}
}
Here's the output of the code:

Are you calling the parent and child classed derived? also I think the main purpose of INEHRITANCE is override and extend parent class functionalities and behavior.