publicclassMethodArgsTest{publicstaticvoidmain(String[] args){
MethodArgsTest test =newMethodArgsTest();
test.show(12);// test.show("hello");// test.show("hello","world");// test.show();
test.show(newString[]{"AA","BB","CC"});}publicvoidshow(int i){}publicvoidshow(String s){
System.out.println("show(String)");}publicvoidshow(String ... strs){
System.out.println("show(String ... strs)");for(int i =0;i < strs.length;i++){
System.out.println(strs[i]);}}//不能与上一个方法同时存在// public void show(String[] strs){// // }//The variable argument type String of the method //show must be the last parameter// public void show(String ...strs,int i){// // }}