title: Creating a tic tac toe board through the use of a two dimensional array
body: <p>In this code, I try to create a two dimensional array that represents a tic tac toe board (with user input) but no matter what I enter in "TicTacLine", the program always brings up "Have you never played Tic Tac Toe before ? It's okay if you haven't, but just FYI, it plays with x's and o's.", which is the message I wrote if the characters in uno, dos and tres weren't either x's or o's.</p>
  
  <pre><code>public class TicTacToe {
  
      public static void main(String[] args) {
          int TicTac[][]= new int[3][3];
  
          System.out.println("Enter the Tic Tac Toe board you want to see, one line at a time.");
          Scanner scanner = new Scanner(System.in);
          String TicTacLine = scanner.nextLine();     
          int loop = 0;
  
          if (TicTacLine.length()&lt;3 | TicTacLine.length()&gt;3) {  // I try to define the array by a series of inputs that go in the while loop.
              System.out.println("Tic-tac-toe plays in a 3×3 grid. This means if you want to input a line, you would want to input 3 characters, no more, no less.");
          } else { 
              while (loop != 3) { // we count the loops so that there's only 3 different lines
                  char uno = TicTacLine.charAt(0);
                  char dos = TicTacLine.charAt(1);
                  char tres = TicTacLine.charAt(2);
                  if (uno != 'x' | uno != 'o' | dos != 'x' | dos != 'o' | tres != 'x' | tres != 'o') {
                      System.out.println("Have you never played Tic Tac Toe before ? It's okay if you haven't, but just FYI, it plays with x's and o's.");
                      break;
                  } else { 
                      if (loop == 0) {
                          TicTac[0][0] = uno;
                          TicTac[0][1] = dos;
                          TicTac[0][2] = tres; 
                          loop = ++loop;
                          TicTacLine = scanner.nextLine();
                      } if (loop == 1) {
                          TicTac[1][0] = uno;
                          TicTac[1][1] = dos;
                          TicTac[1][2] = tres;
                          loop = ++loop;
                          TicTacLine = scanner.nextLine();
                      } if (loop == 2) {
                          TicTac[2][0] = uno;
                          TicTac[2][1] = dos;
                          TicTac[2][2] = tres;
                          loop = ++loop;
                          TicTacLine = scanner.nextLine();
                          }
                      }
                  }
              }   
          if (loop == 3) {
          for(int[] row : TicTac) {
              PrintingRow(row);
              } 
            } 
          }
      }
  </code></pre>