你需要类似的东西
myobjectMatrix foo[][] = new myobjectMatrix[width][height]
// Remember that everything in the matrix is initialized to null so
// you must initialize everything
foo[0][0] = new myobjectMatrix();
Run Code Online (Sandbox Code Playgroud)
稍微搜索一下并没有什么害处。这真的很简单。
Object[][] matrix = new Object[rows][cols];
Run Code Online (Sandbox Code Playgroud)