What is the output of this program?
class A & class B both contain display() method, class B inherits class A, when display() method
is called by object of class B, display() method of class B is executed rather than that of Class A.
output:
$ javac method_overriding.java
$ java method_overriding
2
Submit Your Solution hear: