title: Java Calculator - Find integers in string input
body: <p>I am starting to create a calculator in java and I'm trying to loop through a string input and if there are any integers in the input, then add them to the ArrayList calcOperands. In the parseInput() method, I have done this for the operators using the charAt() method but I need something like intAt() to find integers in the string.</p>
  
  <pre><code>import java.util.*;
  import java.awt.*;
  import javax.swing.*;
  
  public class stringCalculator 
  {
  private ArrayList&lt;Integer&gt; calcOperand = new ArrayList&lt;Integer&gt;();
  private ArrayList&lt;Character&gt; calcOperator = new ArrayList&lt;Character&gt;();
  private String input1;
  
  public stringCalculator(String input1)
  {
      this.input1 = input1;
  }
  
  public void checkInput(String input1)
  {
      boolean expression = input1.matches("[-+/*0-9]+[-+/*0-9]");
      System.out.println(expression);
  }
  
  public void parseInput()
  {
      int s = 0;
      int e = 0;
      for (int i = 0; i &lt; input1.length(); i++)
      {
          if (input1.charAt(i) == '+' || input1.charAt(i) == '-' || input1.charAt(i) == '*' || input1.charAt(i) == '/')
          {
              calcOperator.add(input1.charAt(i));
          }
          //NEED TO FIND INTEGERS HERE
      }
  }
  
  public void printOperators()
  {
      int n = calcOperator.size();
      for (int i = 0; i &lt; n; i++)
      {
          System.out.println(calcOperator.get(i));
      }
  }
  
  public void printOperands()
  {
      int n = calcOperand.size();
      for (int i = 0; i &lt; n; i++)
      {
          System.out.println(calcOperand.get(i));
      }
  }
  }
  </code></pre>
  
  <p>This is my main method</p>
  
  <pre><code>import java.util.*;
  
  public class Main
  {
      public static void main(String[] args) 
      {
          Scanner scanner = new Scanner(System.in);
          String input1 = scanner.nextLine();        
          stringCalculator c = new stringCalculator(input1);
          c.addOperators();
          c.checkInput(input1);
          c.parseInput();
          c.printOperands();
          c.printOperators();
      }
  }
  </code></pre>