The supervisor hook is executed, ignoring the supervisee hook. Results from the supervisee hook executions are not available to the supervisor, because the supervisee hook is not executed. Calling the get_hook_results method returns None.
xxxxxxxxxx
- To change the method behavior in the derived class from the base class
- `private` methods are not overriden
- both methods must have same name and same return type
xxxxxxxxxx
// Java program to demonstrate
// method overriding in java
// Base Class
class Parent {
void show() { System.out.println("Parent's show()"); }
}
// Inherited class
class Child extends Parent {
// This method overrides show() of Parent
@Override void show()
{
System.out.println("Child's show()");
}
}
// Driver class
class Main {
public static void main(String[] args)
{
// If a Parent type reference refers
// to a Parent object, then Parent's
// show is called
Parent obj1 = new Parent();
obj1.show();
// If a Parent type reference refers
// to a Child object Child's show()
// is called. This is called RUN TIME
// POLYMORPHISM.
Parent obj2 = new Child();
obj2.show();
}
}