I have one problem in inheriting CCSprites in java, i post some of codes here,
public class Block extends CCSprite
  {
stati开发者_Python百科c Block temp=null;
     ...
     ...
   static Block newBlock(tetrominoTypes blockType)
      {
        temp = (Block) Block.sprite(filename); // class cast exception here
   }
return temp;
 }
...... }
Class cast expection occur on runtime , how can i resolve it.If any one knows means help me out.
sprite seems to be a static function of the mother class.
Maybe try :
temp = (Block) CCSprite.sprite(filename);
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论