title: Do-While loop user-entered not looping
body: <pre><code>int ID;
  
  Scanner scan = new Scanner(System.in);
  ID = Integer.parseInt(scan.nextLine());
  
  do{
     System.out.println("Improper EMPID, please reenter your EMPID.\n");
     Scanner scan1 = new Scanner(System.in);
     ID = Integer.parseInt(scan1.nextLine());
  }
  while (ID &gt; 999999 &amp;&amp; ID &lt; 10000000);
  
  return ID;
  </code></pre>
  
  <p>This is a function in my main code where I attempt to have the user enter a seven digit ID. <BR> It's supposed to <strong>loop infinitely until the user enters seven digits</strong>, however will only loop through once then exits.  <BR> <BR> I have also done this with a while loop with the same results.  Something I'm not seeing here?</p>
  
  <pre><code>  Scanner scan = new Scanner(System.in);
    int id = Integer.parseInt(scan.nextLine());
  
    while (id &gt;= 10000000 || id &lt;= 999999);{
       System.out.println("Please enter your EMPID\n");
       id = Integer.parseInt(scan.nextLine());
    }
  
  
    return id;
  </code></pre>
  
  <p>My code now looks like this.</p>
  
  <p>It will constantly loop without showing the print.</p>