检查职位是否被占用的最佳方法是什么?我认为我不应该使用“this==null”...
class Cell {
int column;
int row;
char letter;
public Cell(int column, int row, char letter) {
super();
this.column = column;
this.row = row;
this.letter = letter;
}
public boolean isEmpty() {
if (this==null) return true;
else return false;
}
}