Hello ranchers,
Can anyone justify the output of following code ?
According to myself output should be as follow :-
Parent's method2()
Child's method1()
Because, we are calling method2 with reference of child class.
But, the actual output is

:-
Parent's method2()
Parent's method1()
Please, explain it.
Thanking you all,
Pranav Thakker