I have a properties file that contains this information:
info.row1=1100011 info.row2=1000001 info.row3=0001000 info.row4=0011100 info.row5=0001000 info.row6=1000001 info.row7=1100011 Also I have a matrix like this
info = new int[7][7]; I want to save each int number in a part of the matrix, like this:
--------------- |1|1|0|0|0|1|1| --------------- |1|0|0|0|0|0|1| --------------- |0|0|0|1|0|0|0| --------------- |0|0|1|1|1|0|0| --------------- |0|0|0|1|0|0|0| --------------- |1|0|0|0|0|0|1| --------------- |1|1|0|0|0|1|1| --------------- How can I do that? I have this code that works well until now, I just need to save that info in the matrix.
private void startInfo(Properties data) { info = new int[7][7]; for(int i = 0; i < 7; i++) { for(int j = 0; j < 7; j++) { String estate = data.getProperty( "info.row" +i ); info[i][j] = ???????????; } } }