You are making temp reference your static chessboard. As such, they are essentially the same thing. You need to make a new chessboard and populate. String temp[][]=chessBoard;does NOT copy the values to a new object, it just creates a reference to the original chessBoard.
↧