Java: How to make a 2D array of a particular object : <p>I have the following class in Java:</p>

<pre><code>public class Cell {
    private int x;
    private int y;
    private int g;
    private int h;
    public Cell(int x, int y, int g, int h) {
       this.x = x;
       this.y = y;
       this.g = g;
       this.h = h;
    }
}
</code></pre>

<p>I want to make a 2D array with each element of the array being of type Cell. However, I am not sure what is the best way to go about doing this. Any insights are appreciated.</p>
