Single and multi-assignment, distribution
The caller type (parent type) of the method is called the static type. The caller's final type (its own type) is called the actual type.
When the method version is determined by the caller's actual type + type in the method parameter, this assignment is called multi-Dispatch. It is called single dispatch Based on the caller and method parameters.
The assignment is based on the method version determined by the type.
Java supports static multi-assignment and dynamic single-assignment.
First, static assignment occurs in the compilation phase. In the compilation phase, if you want to determine the method version, you need to know the caller's actual type and parameter type. Therefore, it is multi-allocation.
Multi-Dispatch occurs in the compilation phase. Because the actual type of the parameter is known after compilation, you only need to know the actual type of the method caller to determine the unique version of the method, therefore, Dynamic assignment must be a single assignment.