title: How to get new time in Java?
body: <p>What is the correct way of getting the updated time in Java? </p>
  
  <pre><code>    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS");
      java.util.Date today = Calendar.getInstance().getTime();
      String currTime = dateFormat.format(today);
  
      System.out.println(currTime);
      try {
          Thread.sleep(2000); 
          System.out.println("2s delayed"); //2000 milliseconds delay
      } catch(InterruptedException ex) {
          Thread.currentThread().interrupt();
      }
      System.out.println(currTime);
  </code></pre>
  
  <p>This will give me something like this:</p>
  
  <pre><code>2016/04/07 12:39:05.281
  
  2s delayed
  
  2016/04/07 12:39:05.281   
  </code></pre>
  
  <p><em>As you see it is the <strong>same exact time</strong>, even after the 2s delay.</em></p>
  
  <p>12:39:<strong>07</strong>.281 is the correct time for the second output. </p>
  
  <p>Why am I not getting this?</p>