I'm trying to type an Array but I get java.lang.ArrayIndexOutOfBoundsException: 3
I googled it and I know everything about this exception but I can't do anything to solve this stupid problem.
public static void main(String[] args) {
int [][] matrix = new int[3][5];
for (int i =0; i<matrix.length; i++) {
for (int ii=0; ii<matrix[i].length; i++) {
System.out.print(matrix[i][ii]);
}
System.out.println(" \n");
}
}