无法获取PVectors的ArrayList数组

时间:2018-01-19 02:06:43

标签: java arrays arraylist processing

出于某种原因,处理编辑器给了我一个The class "Vectors" does not exist ...我错过了什么?

int num_gradations = 100;

ArrayList[] AllGradation = new ArrayList[num_gradations];
ArrayList<PVector> Vectors = new ArrayList<PVector>();

void setup() {
  size(700, 700, P2D);
  smooth(8);
  randomSeed(20);

  for (int l = 0; l>num_gradations; l++) {
    AllGradation[l] = new Vectors();
  }
}

1 个答案:

答案 0 :(得分:0)

这是正确的方法:

int num_gradations = 100;

ArrayList[] AllGradation = new ArrayList[num_gradations];

void setup() {
  size(700, 700, P2D);
  smooth(8);
  randomSeed(20);

  for (int l = 0; l>num_gradations; l++) {
    AllGradation[l] = new ArrayList<PVector>();
  }
}