title: How can I find the first occurrence in a string that is not numeric in java
body: <p>I'm working on my own method in Java that will be able to calculate math equations given a string. Basically my calculator gets something like "698+33-47*2".
  I want to split the parts (using substring and finding the characters '+', '-', '*', '/') but I'm not sure how to find the first non numeric character. My method is like this so far:</p>
  
  <pre><code>public void DoEquation() {
    String s = storedData.getText() + data.getText();
    s = s.replaceAll(" ", "");
  
    ArrayList&lt;String&gt; list = new ArrayList&lt;&gt;();
    boolean checking = true;
    while (checking) {
      if (!s.contains("+") &amp;&amp; !s.contains("-") &amp;&amp; !s.contains("*") &amp;&amp; !s.contains("/") {
        checking = false;
        break;
      }
      // Logic for extracting the numbers into the list
      // Then extract the mathamatical sign and place into list
    }
    System.out.println(list); // For testing
  }
  </code></pre>