title: Casting from Object[] to String[] gives a ClassCastException
body: <p>The <code>getStrings()</code> method is giving me a <code>ClassCastException</code>. Can anyone tell me how I should get the model? Thanks!</p>
  
  <pre><code>public class HW3model extends DefaultListModel&lt;String&gt;
  {           
      public HW3model()
      {
          super();
      }
  
      public void addString(String string)
      {
          addElement(string);
      }
  
      /**
       * Get the array of strings in the model.
       * @return
       */
      public String[] getStrings()
      {
           return (String[])this.toArray();
      }
  }    
  </code></pre>