它是
varargs
,只能在参数列表中最后使用。最后一个参数可以容纳多个对象。
public class C { int i; String[] s; public C(int i, String... s){ this.i = i; this.s=s; }}new C(4,"a","b") // will be transformed to int and String[]查看“ a”和“ b”如何转换为数组。

它是
varargs
,只能在参数列表中最后使用。最后一个参数可以容纳多个对象。
public class C { int i; String[] s; public C(int i, String... s){ this.i = i; this.s=s; }}new C(4,"a","b") // will be transformed to int and String[]查看“ a”和“ b”如何转换为数组。