title: 2D Array sum all numbers in a row except for the diagonal index
body: <p>I was wrecking my brain for a while now and finally gave up. </p>
  
  <p>Say, this is my array:</p>
  
  <pre><code>   int[][] arr =   {{ 144, 2, 3, 2, 5},
                      {2, 36, 1, 2, 1},
                      {0, 0, 9, 0, 3},
                      {4, 4, 4, 225, 3},
                      {1, 1, 1, 1, 16}};
  </code></pre>
  
  <p>I need to calculate the sum of all of the numbers except for the <code>arr[i][i]</code> and then compare it's power of two to the said number.</p>
  
  <p>For example, <code>144</code> is the <code>arr[0][0]</code> in the first loop. I need to take <code>(2 + 3 + 2 + 5)^2</code> and check if it's equal to <code>144</code> (it is). I was happy when I did it with the first row, but then got stuck on idea of taking every now except the <code>arr[i][i]</code> number, which in the second row is <code>36</code>.</p>
  
  <p>I got nothing until now, only wrong assumptions. I'm still learning 2D arrays but the subject doesn't sit well.</p>
  
  <pre class="lang-java prettyprint-override"><code>public class TwoDArray {
  
      public static void SquareNum(final int[][] arr) {
      double sqaureSum = 0;
      int total = 0;
      for (int i = 0; i &lt; arr[i].length - 1; i++) {
          total = 0;
          for (int j = 0; j &lt; arr[i].length; j++) {
              }
              ???
          }
      }
      public static void main(final String[] args) {
          final int[][] arr =   {{ 144, 2, 3, 2, 5},
                              {2, 36, 1, 2, 1},
                              {0, 0, 9, 0, 3},
                              {4, 4, 4, 225, 3},
                              {1, 1, 1, 1, 16}};
      SquareNum(arr);
      }
  }
  </code></pre>
  
  <p>Any leads on how I can achieve this?</p>
  
  <p>Thanks :)</p>