このコードを実行しようとしていますが、ArrayIndexOutOfBound
例外エラーが引き続き発生します。
public class Heisenberg {
public static void main(String[] args) {
int[] array1 = new int[5];
int[] array2 = new int[5];
Ext(-1, 10, array1, array2);
}
public static void Ext(int q, int w, int[] e, int[] r) {
if (q >= 0)
e[q] = w;
r[q] = w;
}
}
私は配列に少し慣れていないので、すべての助けに感謝します。enter code here