title: Cast Object array to Custom Class array
body: <p><br /><br /></p>
  
  <p>i created a class derived of Object and I have a object array.<br />
  how to do cast <strong>object array</strong> to <strong>my class array</strong>?<br /></p>
  
  <pre><code>public class CastArray{
  
  public CastArray(){
  }
  
  public long toLong(){
      return Long.parseLong(this.toString());
  }    
  
  public double toDouble(){
      return Double.parseDouble(this.toString());
  }
  
  public int toInteger(){
      return Integer.parseInt(this.toString());
  }
  }&lt;br /&gt;
  </code></pre>
  
  <p>return Error:<br />
      java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [LBasic.CastArray;</p>