title: Java: find sum of 2d array of numbers
body: <p>Ok, so this sounds simple. but its been playing with my head for a little while now. </p>
  
  <p>I need to create a method which finds the sum of a 2d array of integers.</p>
  
  <p>I need to create the method:</p>
  
  <pre><code>public static int sum(int[][] array) 
  </code></pre>
  
  <p>this is what i done so far:</p>
  
  <pre><code>public static int sum(int[][] array){
  int sum1 = 0;
      for (int i : array)
          sum1 += i;
  
      return sum1;
  }
  </code></pre>
  
  <p>But I'm getting an error <code>'incompatible types required int[] found int.'</code>.<br>
  Anyone that can help me complete this challenge?</p>
  
  <p>Thanks.
  Edit:
  an example array would be:</p>
  
  <pre><code>3 -1  4  0
  5  9 -2  6 
  5  3  7 -8
  </code></pre>
  
  <p>for now they will always be of this format (4x3).</p>