+ 2

Explain run time polymorphism in Java ?

17th Sep 2016, 7:11 PM
Sadab Khan
Sadab Khan - avatar
3 odpowiedzi
+ 1
same function work differntly on dfrnt object(bt having same super class)
17th Sep 2016, 7:29 PM
Ankit Panwar
Ankit Panwar - avatar
+ 1
The best example of run time polymorphism that i could think of is method overriding.
17th Sep 2016, 7:49 PM
Ousmane Diaw
0
Run-time polymorphism in Java happens when the program decides which method to call while it's running, not when the code is written. This happens through method overriding, where a subclass gives its own version of a method already defined in the parent class. The program chooses which version to run based on the object at that moment. For more detailed information, I recommend reading the blog on : "https://uncodemy.com/blog/virtual-function-in-java-run-time-polymorphism-in-java/" Which provides clear and easy-to-understand explanations on this topic...
18th Dec 2024, 10:57 AM
archi jain
archi jain - avatar