how is ambiguous overloaded method call resolved in java?