static void check (String x, int ... ys) { for (int y : ys) { System.out.println (y); } } check ("foo",1,2); check ("bar",1,2,3,4);