title: Deleting specific row in 2D arraylist in java
body: <p>I want to delete a specific row from 2D arraylist and that row is replaced by the next row. I wrote following code:</p>
  
  <p><code>Collection&lt;?&gt; c = joint_mat.get(row);
    joint_mat.get(row).removeAll(c);</code></p>
  
  <p>This code is deleting the elements of the row but not replacing it with the next row. Output is as follows:</p>
  
  <p>[0.6, 0.608, 0.608, 0.628, 0.608], </p>
  
  <p>[0.6, 0.6, 0.6, 0.608, 0.608], </p>
  
  <p>[0.6, 0.652, 0.6, 0.612, 0.608], </p>
  
  <p><strong>[],</strong> </p>
  
  <p>[0.612, 0.632, 0.608, 0.604, 0.608], </p>
  
  <p>[0.6, 0.604, 0.604, 0.62, 0.62], </p>