When you make a call on overloaded methods the most specific one is called and definitely String is more specific than Object.
If you add following to your code you will get ambiguity as compiler have problem finding the specific one.
Object class should be more specific not String class as Object is associated to all classes (As super class of all the classes).
Can you please clarify it a bit more?
Joined: Oct 30, 2009
A subclass is always more specific than its Super class. Object is more generalised class which every class extends to become a more specific one.
Can a object class do evrything what a String or any of its subclasses specifically do???