How to store data from txt file into 2d array java?
<p>and store it into an int 2d array roomLayout = new int[numberOfRooms//=5][Arr.length];</p>

<p>This is what i got until now </p>

<pre><code>str = gamemap.readLine();

String[] strArr = str.split(",");
System.out.println(str);
roomLayout = new int[numberOfRooms][str.length];
for (String number : strArr)
{
    int strToInt = Integer.parseInt(number);
    System.out.print(number);
}
</code></pre>