title: How to pair string input with chars in a 2D array?
body: <p>When I run the method below keep in mind ADFGVX will be printed to the left and over the top of the array when its displayed, just like a classic ADFGVX cypher.</p>
  
  <pre><code>static char [][] poly = new char[][]{
          {'p','h','0','q','g','6'},
          {'4','m','e','a','1','y'},
          {'l','2','n','o','f','d'},
          {'x','k','r','3','c','v'},
          {'s','5','z','w','7','b'},
          {'j','9','u','t','i','8'}};
  </code></pre>
  
  <p>I have written a method that displays a polybius square using a 2d array(array can be seen above) and what I want to do is pair what ever the user enters with the square, so if the user types OBJECT I want it to return FG VX XA DF GV XG.</p>
  
  <pre><code>Scanner console = new Scanner (System.in);
  
  String phrase;
  
  displayGrid();
  System.out.println("");
  
  System.out.print("Please enter a phrase you want to use\n");
  phrase = console.nextLine();
  
  console.close();
  </code></pre>
  
  <p>Does anyone here know how I would go about this? I was going to make a switch statement or something but I don't think that would work and even if it did it would be very long and inefficient.</p>