public class testMail { public static void fun(int... x) {
for(int i = 0;i < x.length;i++) {
System.out.print(x[i] + ",");
}
}
public static void main(String args[]) throws Exception{
fun(5); System.out.println("");
fun(5,6); System.out.println("");
fun(5,6,7);
}
}
输出:
5,
5,6,
5,6,7,