title: Checking each character for a number
body: <p>I am trying to loop through a string and check each character if one of the characters is a number. If it is a number, I want to return it as true. I have a string "crash", though it returns it as true (that it has a number).  </p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>public boolean isNumber()
  {
    String newString = "crash";
    boolean isNumber = true;
    for (int i=0; i&lt;newString.length(); i++)
    {
       if (Character.isDigit(newString.charAt(i)))
       {
          isNumber = true;
          continue; // continue looping through the string. Go on to the next index.
                    // The character at index i is a number.
       }
       else
       {
          isNumber = false; 
          break; // terminate the for-loop and return it as false! It is not a number!
       }
     }
    return isNumber;
  }
  </code></pre>
  
  <p>I can't figure out what's wrong. My logic seems to be fine, but my coding isn't. </p>
  
  <p>EDIT: I figured it out. Thanks for all your help!</p>