If you know how to get user input, then creating a 2D array is simple enough:
int[][] matrix = new int[numRows][numCols];
You can access a specific element of the array as matrix[row][col].
If you need more help, your best bet would be to search the web for answers. A Google search for "2d array java" turns up a multitude of resources.