Skip to content

Commit ee622ba

Browse files
committed
Added Done
Signed-off-by: Someshdiwan <[email protected]>
1 parent b966a37 commit ee622ba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Section11ObjectOrientedProgramming/src/Polymorphism.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,13 @@ Why is Polymorphism Important?
8080
- Simplified Code Maintenance: Using polymorphism can reduce the complexity of your code and make it easier to maintain,
8181
as you don't need to know the exact type of an object when you invoke its methods.
8282

83+
Runtime polymorphism in Java is enabled through dynamic method dispatch.
84+
85+
This mechanism allows the Java Virtual Machine (JVM) to determine which method implementation to call at runtime based
86+
on the actual type of the object, rather than the reference type.
87+
88+
It is achieved through method overriding and is a key feature of object-oriented programming,
89+
providing flexibility and extensibility to the code.
90+
8391
In summary, polymorphism makes it easier to extend and maintain your code while enabling more flexible and dynamic
8492
behavior at runtime.

0 commit comments

Comments
 (0)