public class Demo09 {
public static void main(String[] args) {
test(1.0,2,3);
}
public static void test(double x,int... y){
System.out.println("x: "+x);
System.out.print("y: ");
for (int i:y
) {
System.out.print(i+" ");
}
}
原文:https://www.cnblogs.com/zuozs/p/14316103.html