title: how to solve no output problem -using while-?
body: <p>I try to read each char of "Mi4"
  if it is letter put it in variable "capital"
  if it is number put it in variable "num"
  there is no error, and NO output "</p>
  
  <pre><code>public static void main(String[] args) {
      String capital = "";
      int num = 1;
      String sentence = "Mi4";
      int senLength = sentence.length();
      int i = 0;
      while (i &lt; senLength) {
          String senStr = sentence.substring(i, i + 1);
          char senChar = senStr.charAt(i);
          if (senChar &gt;= 'A' &amp;&amp; senChar &lt;= 'Z') {
              capital = senStr;
          } else if (senChar &gt;= 'a' &amp;&amp; senChar &lt;= 'z') {
              capital = capital + senStr;
          } else if (senChar &gt;= '2' &amp;&amp; senChar &lt;= '9') {
              num = Integer.parseInt(senStr);
          }
          i++;
          sentence = sentence.substring(i);
      }
      System.out.println(capital);
      System.out.println(num);
  }
  </code></pre>