Consider:
int[][] multD = new int[5][]; multD[0] = new int[10];
Is this how you create a two-dimensional array with 5 rows and 10 columns?<
int rows = 5; int cols = 10; int[] multD = new int[rows * cols]; for (int r = 0; r < rows; r++) { for (int c = 0; c < cols; c++) { int index = r * cols + c; multD[index] = index * 2; } }
Enjoy!