my java application doesnt work and i have no clue why : <p>I'm trying to create a simple application that creates a 2D Grid based off of its dimensions and then prints it, but the main method throws an error every time. what am i doing wrong?</p>

<pre><code>static void int[][] createGrid(int x, int y) {
    int Grid[][] = new int[x][y];

    for (int a = 0; a &lt; Grid.length; a++) {
        for (int b = 0; b &lt; Grid[a].length; a++) {
            //check if there is something that currently needs to go there
            //else 
            Grid[a][b] = 0;
        }
    }
}
public static void printgrid (int[][] Grid) {
    for (int a = 0; a &lt; Grid.length; a++) {
        for (int b = 0; b &lt; Grid[a].length; b++) {
            System.out.print(Grid[a][b]);
        }
        System.out.println();
    }
}
public static void main(String[] args) {
    printgrid(createGrid(10, 20));

}
</code></pre>

<p>}</p>
