title: Casting Object array into String array throws ClassCastException
body: <pre><code>List&lt;String&gt; list = getNames();//this returns a list of names(String).
  
  String[] names = (String[]) list.toArray(); // throws class cast exception.
  </code></pre>
  
  <p>I don't understand why ? Any solution, explanation is appreciated.</p>