int [][] x = new int[10][10]; for(int i = 0; i < 10; i++) for(int j = 0; j < 10; j++) x[i][j] = i*10 + j + 1; // i acts as the "10"s column, j as the "1"s column