title: Matrix in txt file - Java
body: <p>I have a problem with matrix. I have a matrix in txt file. This matrix looks:</p>
  
  <pre><code>231 324 123
  345 565 234
  657 234 654
  </code></pre>
  
  <p>I want to replacement elements to form:</p>
  
  <pre><code>654 234 657
  234 565 345
  231 324 123
  </code></pre>
  
  <p>I have a algorithm with replacement elements: 3-1-i, where i is number of choosen element from array. I have a problem how I read file and save elements to array and how implement this loop. This is my try with reading txt file and saving elements to array:</p>
  
  <pre><code>    List&lt;String[]&gt; rows = new ArrayList&lt;String[]&gt;();
      while ((line = bfr.readLine()) != null) {
          String[] row = line.split(" ");
           rows.add(row);
  
         }
      System.out.println(rows.toString());  
  </code></pre>
  
  <p>But I get <code>[Ljava.lang.String;@525483cd</code> as result.<br>
   Can anyone help me with this loop and reading this matrix?</p>