与void show(int a, char b, double c){}构成重载的有:

a) void show(int x, char y, double z){} //no

b) int show(int a, double c, char b){} //yes

c) void show(int a, double c, char b){} //yes

d) boolean show(int c, char b){} //yes

e) void show(double c){} //yes

f) double show(int x, char y, double z){} //no

g) void shows(){double c} //no

 

 

形参个数可变

 

public static void test(int a ,String…books);

public static void test(int a ,String[] books);

 

其中形参中可变参数部分放在方法形参传入的最后

 

 

JAVA类的四种访问权限