title: copying column of a 2D array as 1D array in java?
body: <p>Let's say I have a 2D array:  </p>
  
  <pre><code>int[][] a = new int[4][3];
  </code></pre>
  
  <p>populated such that:</p>
  
  <pre><code>1 2 3
  4 5 6
  7 8 9
  2 5 7
  </code></pre>
  
  <p>Is there any shortcut method in java to extract lets say column 1 as single array:</p>
  
  <pre><code>array1 = {1 4 7 2};
  </code></pre>
  
  <p>Currently what I am doing is traversing through the whole 2D matrix and with if condition (<code>if j==0</code>), I traverse over the rows and add values to 1D array.<br>
  Just wondering if there is any standard method offered in java for such tasks.</p>