📜  java中的运行时多态性 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:10.684000             🧑  作者: Mango

代码示例1
Runtime polymorphism is a process of which take
cares the overriding method at run time
rather than compile time.
 In method overriding,
a subclass overrides a method with the same 
signature as that of in its superclass. 
During compile time, the check is made 
on the reference type. But, in the runtime,
JVM figures out the object type and would 
run the method that belongs to
that particular object.