Thread: Matrices
View Single Post
Old Apr 15th, 2007, 1:54 AM   #2
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
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.
titaniumdecoy is offline   Reply With Quote