title: 2D array shift up or down for column for square matrix
body: <p>I know how to shift the row of the 2d array of type double
  where i is the matrix size</p>
  
  <pre><code>public static void rowshiftRight(int i, double[][] array) {
          int m = array[i].length;
          double temp = array[i][m-1];
          for (int k=m-1; k&gt;=1; k--){
              array[i][k] = array[i][k-1];
          }
          array[i][0] = temp;
      }
  </code></pre>
  
  <p>I'm trying to change the above logic to shiftcolum, any help will be grateful </p>
  
  <pre><code>//wrong code
  public static void colshiftdownorup(int i, double[][] array) {
          int m = array.length;
          double temp = array[m-1][i];
          for (int k=m-1; k&gt;=1; k--){
              array[k][i] = array[k-1][i];
          }
          array[i][0] = temp;
      }
  </code></pre>