Overload function int… and long… simultaneously
I want to create two functions, say long min(long...); int min(int...); But when I try to invoke the second i.e min(1, 5) one I get ambiguous method call Is there workaround except renaming? It is a known bug The behaviour you describe is a bug which has been fixed with Java 7. See details in the release notes , section called "Changes in Most Specific Varargs Method Selection". The reason why it should compile Variable arity comes last in determining the most specific method. The rules to determine which vararg method applies when there are several are defined in JLS 15.12.2.4 - here is an