Bogdan
What happens in a method call is that the most specific method of the appropriate class is the one that is called. In very general terms in the code you posted this wou,d be the String argument method because it is lower in the heirarchy than the Object argument method.
Here is the actual quote form the
JLS section 15.12.2.2
If more than one method declaration is both accessible and applicable to a method invocation, it is necessary to choose one to provide the descriptor for the run-time method dispatch. The Java programming language uses the rule that the most specific method is chosen.
The informal intuition is that one method declaration is more specific than another if any invocation handled by the first method could be passed on to the other one without a compile-time type error.
Basically, becasue you can pass a String as an argument to a method that is looking for an Object, the String method is the most specific.
Hope that clears it up for you
------------------
Dave
Sun Certified Programmer for the Java� 2 Platform
[This message has been edited by Thomas Paul (edited August 31, 2001).]