|
|
|
|
|
by bsaunder
6135 days ago
|
|
Any definition of polymorphism should at least mention something about the method that is invoked depends on runtime data, and is not resolved (or known) at compile time. I'm not sure that's always true. Or at the very least seems language dependent. |
|
If Class X has two methods:
then: will invoke 'void foo(Object o);' based on the compile time type of test.Java does do dispatch based on the runtime type of X - but it is quite limiting once you are used to having proper multiple dispatch at your disposal.
(caveat: not in front of a javac - this is from memory).