title: Print how many times appears a specific digit in a number
body: <p>The return type is void and there is one input parameter and I am trying to use a while loop to print out how many of a certain number there is an the input integer.</p>
  <p>So as an example int i = 32001; then I want too know how many 0's there are in the int and the output would be 2 cause there's only two 0's in that int.</p>
  <p>My code below for some reason only outputs 0 and I don't know why. Could someone pls fix or help.</p>
  <p>And please don't use any power tools or certain methods that do the work for you and you can use for loop or while loop.</p>
  <pre><code>public class loopPrr
  {
  
  public void howMany0(int i){
          
          
          int n = 0;
          int howmany = 0;
          char z = '0';
           while(i &lt;= 0){
               ++i;
              if(i == z){
                  howmany++;  
              }
          }
         
           System.out.println(howmany);
      }
  
  
  public static void main(String args[]){
          
          loopPrr n = new loopPrr();
      
          
          n.howMany0(32001);
          
          
      
      
      }
  
  
  
  
  
  }
  
  
  
  </code></pre>