title: find average of a matrix in java
body: <p>How to find average of each 8 element in a 2D-matrix(5×5) and replace it in element number(9) ?</p>
  
  <p>in java programming (OOP)</p>
  
  <p>in frist code should be like <a href="https://www8.0zz0.com/2014/04/20/16/822478277.png" rel="nofollow noreferrer">this</a> 
   and For example :</p>
  
  <p><a href="https://i.stack.imgur.com/MSJZb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MSJZb.png" alt="img"></a><br>
  <sub>(source: <a href="http://www8.0zz0.com/2014/04/20/16/806584000.png" rel="nofollow noreferrer">0zz0.com</a>)</sub>  </p>