You can not sort TreeMap on values. A Red-Black tree based NavigableMap implementation. The map is sorted according to the natural ordering of its keys, or by a Comparator provided at...
  • April 4, 2022
  • 0 Comments
First off: while (board[row][column] == 'X' || board[row][column] == 'O') { System.out.println("This spot is occupied. Please try again"); } This will create a infinite loop because row and column shouldn’t change you should...
  • April 4, 2022
  • 0 Comments