title: Splitting a String then adding the two Strings together
body: <p>Hi I am wondering how to take a String called s, splitting it into two separate Strings, turning the Strings into ints, then adding the two ints together.</p>
  
  <pre><code>public String add() throws IOException {
  
      int answer;
  
      String s = input;
  
      String[] strings = s.split(" + ");
      String string1 = strings[0].trim();
      String string2 = strings[1].trim();
  
      int x = Integer.parseInt(string1);
      int y = Integer.parseInt(string2);
  
      answer = x + y;
      System.out.println(answer);
      return "" + answer;
  }
  </code></pre>