title: Java add variable to string array
body: <p>I have a small code that includes citynames which will be displayed.
  Now a want a user can add names with a scanner, I know the code for the scanner but not how to add the variable.</p>
  <p>Code I have:</p>
  <pre><code>String[] cityNames = { &quot;Tiel&quot;, &quot;Culemborg&quot;, &quot;Houten&quot;, &quot;Geldermalsen&quot;, &quot;Meteren&quot;, &quot;Buren&quot; }; 
  System.out.println(Arrays.toString(cityNames));
  </code></pre>