title: Trying to implement text-based Hangman game in Java
body: <p>I need to check if the user-input letter, along with the spaces they guess, is at a specific spot on the hidden word.</p>
  
  <p>the variable one is equal to the space index the user guessed.. and letterGuess is the letter they guessed. How is my code wrong??</p>
  
  <p>example: secret word is hello</p>
  
  <pre><code>hidden word is ==  -----
  </code></pre>
  
  <p>user guesses <code>h 0 1 2 3</code>
  so, it needs to check if the spaces at indexes 0 1 2 3 at the word <code>hello</code> contain the user guessed "h"
  if so, need to replace <code>-----</code> to <code>h----</code> .</p>
  
  <pre><code>                 String firstSpace = guessedSpaces.substring(0,1);
                  String secondSpace = guessedSpaces.substring(2,3);
                  String thirdSpace = guessedSpaces.substring(4,5);
                  String fourthSpace = guessedSpaces.substring(6,7);
  
                  int one = Integer.parseInt(firstSpace);
  
  
                  int two = Integer.parseInt(secondSpace);
                  int three = Integer.parseInt(thirdSpace);
                  int four = Integer.parseInt(fourthSpace);
  
  
  
       (secretWord.charAt(one)==letterGuess)
       (secretWord.charAt(one)==letterGuess)
      (secretWord.charAt(one)==letterGuess)
      (secretWord.charAt(one)==letterGuess)
  </code></pre>