title: How to add delay to while loop
body: <p>I have a while loop and what I want it to do is every 1 second count up an integer up to 10.
  The code that I have now simply spits out 1-10 as quick as it possibly can with no delay, I'm un-sure how to add a delay.
        package apackage;</p>
  
  <pre><code>public class loops {
      public static void main(String args[]){
          int countdown = 1;
          while (countdown &lt; 10) {
              System.out.println(countdown);
              ++countdown;
          }
      }
  } 
  </code></pre>
  
  <p>So, thanks for reading and appreciate the help in advance.</p>