public static void main(String[] args) { fun(1,2,3,4,5); } //int...i 只能放在参数表的最后;且输入的都要为 int 类型 public static void fun(int...i){ System.out.println(i[0]); System.out.println(i[1]); System.out.println(i[2]); System.out.println(i[3]); System.out.println(i[4]); }