我遇到了如下所示的类和相应的构造函数:
public class Something{
public static final int aConstant = 0;
public static final int bConstant = 1;
private final AnotherThing[] otherObjects
private final float usefulNumber;
public Something(float usefulNumber, AnotherThing ... otherObjects){
this.usefulNumber = usefulNumber;
this.otherObjects = otherObjects;
}
//various methods
}
当我将它放入 Eclipse 时,没有显示任何错误。我假设“...”是某种运算符,但我不确定。任何人都可以澄清这是什么,或者只是表明时间被节省的东西?(节省时间没有任何意义,因为该类只有两个属性)