title: how doesn't work the cast in Java?
body: <p>I have the next code:</p>
  
  <pre><code>if(lineaCurvaPintada){
    FiguraGeometrica f;
    MiLineaCurva c;
   (MiLineaCurva)vShape.get(vShape.size()-1).setCtrlx(evt.getPoint().x);
  }
  </code></pre>
  
  <p>Where FiguraFeometrica is an abstact class. MiLineaCurva extends from FiguraGeometrica.
  setCtrlx is a method of MiLineaCurva class.</p>
  
  <p>vShape is an array of FiguraGeometrica.</p>
  
  <p>Why do I can not access to MiLineaCurva methods?
  The error that Netbeans is give me is: Can't not find method in class FiguraGeometrica.</p>
  
  <p>Thanks!</p>