title: Java - How to make a program run until a specific value is entered
body: <p>I need to make a program that will continue to run and accept numbers as inputs until "0" is entered and then the program will stop. </p>
  
  <p>I believe I need it to be a while loop; Here is what I have so far. </p>
  
  <pre><code>do{
     if(yourInput &gt; 0) {
     }
     else if(yourInput &lt; 0) {
     }
  }while(yourInput !=0); 
  </code></pre>
  
  <p>If I input anything other than 0, it will just print out the same integer a million times.... what am I missing? I need another loop. How do I phrase the new loop so it will keep accepting entries unless "0" is entered. </p>