Arrays 我能';看不出导致错误java.lang.ArrayIndexOutOfBoundsException的原因

Arrays 我能';看不出导致错误java.lang.ArrayIndexOutOfBoundsException的原因,arrays,parsing,for-loop,nested,integer,Arrays,Parsing,For Loop,Nested,Integer,我有一个显示错误的方法,但我不知道问题出在哪里 row = 1700 public void setCodeName(){ this.code = new Integer[this.row]; f or(int i=0; i<this.row; i++){ for(int y=0; y<2; i++){ if(y==0){ this.code[i]=Integer.parseInt(this.

我有一个显示错误的方法,但我不知道问题出在哪里

row = 1700

public void setCodeName(){
    this.code = new Integer[this.row];

    f or(int i=0; i<this.row; i++){
        for(int y=0; y<2; i++){
            if(y==0){
                this.code[i]=Integer.parseInt(this.sn[i][0]);
            }
        }
    }
}
行=1700
public void setCodeName(){
this.code=新整数[this.row];

f或(int i=0;iy的内部“for”循环是递增的“i”(导致无限循环,直到i变得太大),因此它应该是:

for(int y=0; y<2; y++){
for(int y=0;y