title: Out of bounds exception in double dimensional array
body: <p>Trying to find the sum of all even numbers and product of all odd numbers in a double dimensional array.</p>
  
  <p>Why am I getting the following out of bounds exception error ?</p>
  
  <pre><code>Exception java. lang. Array Index Out Of Bounds Exception
  </code></pre>
  
  <p>While running the code this exception comes for line <code>if(m[i][j]%2==0)</code></p>
  
  <p><a href="https://i.stack.imgur.com/LHyck.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LHyck.png" alt="photo of code"></a></p>