Java Method Overloading [duplicate]
问题 This question already has answers here : Why does type-promotion take precedence over varargs for overloaded methods (2 answers) Closed 4 years ago . the following method returns output : in primitive int arg method public class TestMethodOverloading { private void show(int a){ System.out.println("in primitive int arg method"); } private void show(float a){ System.out.println("in primitive float arg method"); } public static void main(String[] args) { TestMethodOverloading tmo = new