title: JAVA : How to create a snake shape matrix
body: <p>Hi I am trying to create a matrix on the console using 2D array. The idea is that the output should look like this one :</p>
  
  <pre><code>1|8|9 |16
  2|7|10|15
  3|6|11|14
  4|5|12|13
  </code></pre>
  
  <p>Is there any one who has an idea how it can be done?</p>