Forums Register Login

Dyanmic method dispatch

+Pie Number of slices to send: Send
Hi,
what is Dynamic Method Dispatch?
Explain me about this Java feature.
thanks
+Pie Number of slices to send: Send
It's probably talking about the runtime decision made by the JVM in polymorphic designs.

When we compile this method, the compiler cannot bind the size() call to a particular class and method at compile time, because it can't know what kind of List might be passed in at run time. At run time the JVM looks up the size() method of the object passed in. The JVM might find the method on the class of the object passed in, or maybe on some super class.
He baked a muffin that stole my car! And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 524 times.
Similar Threads
OO Best Book?
Issue regarding Glass Pane
Similar Action mappings in two xml files but parameters different?
difference between dyanamic dispatch and method overriding
Name of Dispatch
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:18:03.