求助:Exception in thread "Thread-3" java.lang.NullPointerException
while (shapeListener.isMoveDownable(Shape.this)) {
moveDown();
shapeListener.shapeMoveDown(Shape.this);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
public Shape() {
new Thread(new automaticFall()).start();
}
把while 括号里面的改为true运行正常,但是改为指定的就出现如题的错误 是什么原因啊