title: How to calculate the absolute difference between the sum of diagonals?
body: <p>Given a square matrix, calculate the absolute difference between the sums of its diagonals.</p>
  
  <p>For example, the square matrix  is shown below:</p>
  
  <pre><code>1 2 3
  4 5 6
  9 8 9  
  </code></pre>
  
  <p>The left-to-right diagonal =15 . The right to left diagonal = 17. Their absolute difference is 2.
  Please help with the code for Java.</p>