create multiple brick in Java
<p>This is my code so far for creating bricks, and it works: </p>

<pre><code>bricks = new Brick[5];     
this.createBricks(); 

private void createBricks(){
    for (int i = 0; i &lt; 5; i++) {
         Brick brick = new Brick(0,0, Color.RED);  
         bricks[i] = brick;
    }
}
</code></pre>

<p>With this code I´m able to get one brick, but I´m quite sure that all my bricks now is on the same position. So I need help with how I write the positions(in my current code: 0,0) so that the bricks is displayed next to each other, in rows and columns. </p>

<p>Update: </p>

<pre><code>Brick[][] bricks = new Brick[5][5];     
this.createBricks(); 

private void createBricks(){
    for (int i = 0; i &lt; 5; i++) {
        for (int j = 0; j &lt; 5; j++) {
            Brick brick = new Brick(i,j, Color.RED);  
            bricks[i][j] = brick;
        }
    }
}
</code></pre>