java这个怎么冒红了,求详细解释

public class CellTest {

public static void main(String[] args) {
// TODO Auto-generated method stub创建格子对象
Cell c=new Cell();//创建格子对象
//访问成员变量
c.row=4; //行号为4
c.col=5; //列号为5
System.out.println("原始");
wall(c);
//调用方法
c.drop();
System.out.println("下落");
wall(c);

}
public static void wall(Cell cell){
int totalrow=20;
int totalcol=10;
for(int row=1;row<=totalrow;row++){
for(int col=1;col<=totalcol;col++){
if(c.row=row&&c.col==col){
System.out.print("* ");
}else{
System.out.print("- ");
}
}
System.out.println();
}
}

}
下落的方法也没有效果,怎么解决

第1个回答  2016-05-24
public static void wall(Cell cell)参数名改成c

public static void wall(Cell c);
第2个回答  2016-05-24
Java Build Path设置错误 请更正你的Libaries
相似回答