title: Is there a clear way of initializing a loop that is terminated when a number is entered as a String?
body: <p>So it's been about 6 months since I've done anything with coding as well as I'm still relatively new to it. I'm doing some review and the program asks for several attributes, in which one is a string asking for an employee's ID #. It is supposed be in a loop, in which the loop is terminated when the user enters 0 for their employee ID. I have the program working up until this point and I haven't created the loop yet which is where I am stuck.</p>
  <pre><code>`import java.util.Scanner;`
  `public class PayrollTester {`
    `public static void main(String[] args) {`
      `String empID;`
      `float gross;`
      `float ste;`
      `float fed;`
      `Scanner scnr = new Scanner(System.in);`
      `System.out.println(&quot;Enter your Employee ID: &quot;);`
      `empID = scnr.nextLine();`
      `System.out.println(&quot;Enter your Gross Pay: &quot;);`
      `gross = scnr.nextFloat();`
      `System.out.println(&quot;Enter your State Tax Rate: &quot;);`
      `ste = scnr.nextFloat();`
      `System.out.println(&quot;Enter your Federal Tax Rate: &quot;);`
      `fed = scnr.nextFloat();`
  
      `Payroll empID1 = new Payroll(empID, gross, ste, fed);`
  
  
  
     `System.out.println(&quot;The Net Pay for Employee &quot; + 
      empID1.getEmplyeID() + &quot; is &quot; + empID1.calcNetPay());`
   `}`
  `}`
  </code></pre>