title: Use of 'new' for arrays in Java
body: <p>I've been undertaking some basic tutorials. One of which has asked me to set up an array to hold the following string values:</p>
  
  <pre class="lang-none prettyprint-override"><code>Beyonce (f)
  David Bowie (m)
  Elvis Costello (m)
  Madonna (f)
  Elton John (m)
  Charles Aznavour (m)
  </code></pre>
  
  <p>Write a program to loop round, count how many are male vocalists and how many are female, and display my answer in the console.</p>
  
  <p>I managed to complete it, but the way I set up my array was different to the answer provided.</p>
  
  <p>Mine is as follows:</p>
  
  <pre><code>String names[] = {"Beyonce (f)", "David Bowie (m)", "Elvis Costello (m)", "Madonna (f)", "Elton John (m)", "Charles Aznavour (m)"};
  </code></pre>
  
  <p>And the provided answer is as such:</p>
  
  <pre><code>String[] singers = new String[6];
  singers[0] = "Beyonce (f)";
  singers[1] = "David Bowie (m)";
  singers[2] = "Elvis Costello (m)";
  singers[3] = "Madonna (f)";
  singers[4] = "Elton John (m)";
  singers[5] = "Charles Aznavour (m)";
  </code></pre>
  
  <p>Should I be creating a "new" array? If so, why? And what is the difference between the two?</p>