classCell{int row;int col;publicCell(int row,int col){super();this.row = row;this.col = col;}@OverridepublicinthashCode(){finalint prime =31;int result =1;
result = prime * result + col;
result = prime * result + row;return result;}@Overridepublicbooleanequals(Object obj){if(this== obj)returntrue;if(obj == null)returnfalse;if(getClass()!= obj.getClass())returnfalse;
Cell other =(Cell) obj;if(col != other.col)returnfalse;if(row != other.row)returnfalse;returntrue;}@Overridepublic String toString(){return"Cell [row="+ row +", col="+ col +"]";}}