title: Recompile with -Xlint:deprecation for details
body: <p>I need to know how to fix these error notes:</p>
  
  <pre><code>Note: Summer.java uses or overrides a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>import java.util.Calendar;
  import java.util.*;
  
  class Summer
  {
      public static void main(String[] args)
      {
          Date d1 = new Date();
          Date j21 = new Date(d1.getYear(), 6, 21);
          if(d1.before(j21)) {
              long diff = j21.getTime() - d1.getTime();
              diff = diff / (1000 * 60 * 60 * 24);
              System.out.println("There are " + diff + " days until June 21st" );
          }
          else {
              long diff = d1.getTime() - j21.getTime();
              diff = diff / (1000 * 60 * 60 * 24);
              diff = 365 - diff;
              System.out.println("There are " + diff + " days until June 21st" );
          }
      }
  }
  </code></pre>