Split() method in Java for multi-dimensional array
<p>I have a two dimensional array. The assignment is to accept row and columns numbers from user and if user wants to enter numeric data row by row (or column by column) he has to do that with comma. Such as, 3x3 will be:</p>

<p>1,2,4</p>

<p>2,5,3</p>

<p>5,3,2 </p>

<p>So the the first row elements will be [0,0]=1 [0,1]=2 [0,2]=3, second row [1,0]=2 [1,1]=5 [1,2]=3, etc. 
I understand I should possibly do that with string, then split it for ", " and then convert it no Integer, but I have no idea how to do split in such case. </p>

<p>This is what I have for rows input: </p>

<pre><code>for (int row=0; row&lt;board.length; row++){
        for (int column=0; column&lt;board[row].length; column++){
            //System.out.print("["+board[row]+"]["+board[column]+"]: ");
            board[row][column] = myInput.nextInt(); 
            //input validation
            while ((1 &gt; (board[row][column])) || ((board[row][column]) &gt; board.length))
            {
                System.out.println("Please enter number between 1 to "+ board.length +":");
                board[row][column] = myInput.nextInt();
            }
        }
     }  
</code></pre>
