title: multidimensional array row to single array java
body: <p>Hi I have the array below, I need to copy the contents into another single dimensional array but only the first row e.g. 0 and 1</p>
  
  <pre><code>String data[][] = new String[][]
     {
        {"0", "1", "2", "3", "4"},
        {"1", "1", "2", "3", "4"}
     }
  </code></pre>
  
  <p>The above code is an example of how I have set my array, I just need the first row but for every colum</p>
  
  <p>I have tried:</p>
  
  <pre><code>for (int r = 0; r &lt; data.length; r++)
     {
      codes = new String[]  {data[r][0]};
     }
  </code></pre>
  
  <p>But that doesnt work, any ideas? Thanks</p>