class Measurement {
int time;
float value;
Measurement(int argTime, float argValue) {
time = argTime;
value = argValue;
}
}
ArrayList measurements;
void setup() {
measurements = new ArrayList();
measurements.append(new Measurement(1, 20));
}
给我这个错误:
The function append(sketch_140628b.Measurement) does not exist
我做错了什么?
答案 0 :(得分:1)
类ArrayList没有'追加'这样的方法。您想要的功能是添加'。