私はこれを持っています:
public class DoubleList<Key, Elem> implements ADTDoubleList<Key, Elem> {
private Vector<Node<Key, Elem>> leftRight = new Vector<Node<Key, Elem>>(2);
private int[] numLeftNumRight = new int[2];
public DoubleList() {
this.leftRight.set(0, null);
this.leftRight.set(1, null);
this.numLeftNumRight[0] = 0;
this.numLeftNumRight[1] = 0;
}
}
そしてそれはArrayIndexOutOfBoundsExceptionをスローします。
どうしてか分かりません。誰かが私を助けてもらえますか?