Question: 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?

I saw this code online, but the syntax didn't make sense.

Answer: 
The most common idiom to create a two-dimensional array with **5** rows and **10** columns is:

```
int[][] multD = new int[5][10];

```

Alternatively, you could use the following, which is more similar to what you have, though you need to explicitly initialize each row:

```
int[][] multD = new int[5][];
for (int i = 0; i < 5; i++) {
  multD[i] = new int[10];
}

```
Try this way:

```
int a[][] = {{1,2}, {3,4}};

int b[] = {1, 2, 3, 4};

```