title: How to convert Set<String> to String[]?
body: <p>I need to get a <code>String[]</code> out of a <code>Set&lt;String&gt;</code>, but I don't know how to do it. The following fails:</p>
  
  <pre><code>Map&lt;String, ?&gt; myMap = gpxlist.getAll();
  Set&lt;String&gt; myset = myMap.keySet();
  String[] GPXFILES1 = (String[]) myset.toArray(); // Here it fails.
  </code></pre>
  
  <p>How can I fix it so that it works?</p>