 <p>Your code is a beginning, but doesn't fill all values. You should <em>nest</em> your for-loops, and only fill the left part. The right entry can then be mirrored from the left entry. Try this:</p> <pre><code>public static void main(String[] args) { int[][] table = new int[5][8]; for (int row = 0; row &lt; 5; row++) { for (int column = 0; column &lt; 4; column++) { // left side entry [row][0..3] // each entry is 5 more than the entry left of it table[row][column] = column * 5 + row + 1; // right side entry [row][7..4] mirrored from corresponding entry [row][0..3] // i.e. column 7 &lt;- column 0, column 6 &lt;- column 1, etc. table[row][7 - column] = table[row][column]; } } for (int row = 0; row &lt; 5; row++) { for (int column = 0; column &lt; 8; column++) { System.out.format("%4d", table[row][column]); } System.out.println(); } } </code></pre> <p>Output:</p> <pre><code> 1 6 11 16 16 11 6 1 2 7 12 17 17 12 7 2 3 8 13 18 18 13 8 3 4 9 14 19 19 14 9 4 5 10 15 20 20 15 10 5 </code></pre>