Yazeed Hamdan wrote:java do only one step convert while search for best overlode method
well
i tried to write it and it work with out prob
I don't know what you mean by "one step convert" ... but ... there are quite a few rules that apply to resolving the overloaded methods. And due to backward compatibility reasons, one of the rules states that it is done in 3 phases. Specifically, if a phase fails, then the next phase is used.
Anyway, the second method doesn't even apply until the third phase, because it is using varargs. As for the first method, it passes in the first phase. So, there is nothing complex here. Most of the overloaded method resolution rules aren't even needed.
Henry
PS... Here is the relevant part in the Java Language Specification ...
link to JLS