Short answer: Because the language designer decided to resolve parameter types at compile time.
Longer answer: It would have been possible to resolve parameter types at runtime, but it's a little bit tricky. For example, you can easily get ambigious situations:
having methods with signatures
foo(Object,
String)
foo(String, Object)
which one should be called by
foo("string", "string"); ?
The language designer probably thought that it would be better to not let such problems happen at runtime.
BTW, if you need this form of runtime
polymorphism,
you should take a look at the Visitor Design
Pattern aka Double Dispatch.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus