title: How to add 0 in front of every single digit string?
body: <p>How can I add 0 in front of every single digit number? I mean 1 to 01 etc.
  I have tried to add ifs like </p>
  
  <pre><code>if(c &gt;='A' &amp;&amp; c&lt;= 'I')
      str = "0"+str;
  </code></pre>
  
  <p>but it just adds 0 in front of everything like abcd converts to 00001234 not 01020304.</p>
  
  <p>This is my code.</p>
  
  <pre><code>    String A[] = new String[size];
      for (int i = 0; i &lt; size; i++) {
          A[i] = jList1.getModel().getElementAt(i);
          String[] Text = A[i].split("");
          String s = jList1.getModel().getElementAt(i);
          String str = ("");
          for (int z = 0; z &lt; Text.length; z++) {
              for (int y = 0; y &lt; Text[z].length(); y = y + 1) {
                  char c = s.charAt(z);
                  if (c &gt;= 'A' &amp;&amp; c &lt;= 'Z') {
                      str += c - 'A' + 1;
  
                  } else if (c &gt;= 'a' &amp;&amp; c &lt;= 'z') {
                      str += c - 'a' + 1;
  
                  } else {
                      str += c;
                  }
              }
              str = str + "";
          }
      }
  </code></pre>