一.
(1) 函数名称相同
(2) 参数个数相同,但类型不同
public class classes1 { public static void main(String[] args) { count(1,2) count(1,'a') } public static void count(int a. int b){ a = a + b; } public static void count(int a ;char b){ a = b; } }
二 .
(1) 函数名称相同
(2) 参数个数不同
public class classes2 { public static void main(String[] args) { count(1); int c = 0; count(1,2,c) } public static void count(int a){ int b; b = a; } public static void count(int a; int b; int c){ c = a + b; } }