title: How to split a String into integers?
body: <p>I'd like to split a String, and store each digit of the String into an integer. </p>
  
  <p>Here's my test code:</p>
  
  <pre><code>public class test {
      public static void main(String[] args){
          int firstGuessDigit, secondGuessDigit, thirdGuessDigit, fourthGuessDigit;
          String guess = "1234";
          String[] parts = guess.split("\");
          firstGuessDigit = Integer.parseInt(parts[0]);
          secondGuessDigit = Integer.parseInt(parts[1]);
          thirdGuessDigit = Integer.parseInt(parts[2]);
          fourthGuessDigit = Integer.parseInt(parts[3]);
      }
  
  }
  </code></pre>
  
  <p>When I run the program, I get an error: "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
          at test.main(test.java:11)</p>