When you are using overloaded methods, compiler try to invoke the method which is the
nearest possible match.
In your case 10 was an integer but only a method with long argument is present so, 10 was
widened to long. If you comment long, then the most nearest match will be float. So it's just
to which nearest possible match an invocation matches, compiler picks it up.