Algorithm 5.1 Method-Dispatch-Of-Virtual-Calls
Input: Type of receiver object and method signature at call site.
Output: The signature of target method.
1:procedure Dispatch()
2:if contains non-abstract method that has the same name and descriptor as then
3:return
4:else
5:Let be the superclass of .
6:return Dispatch()
7:end if
8:end procedure