title: Compare Calendar and java.util.date dates
body: <p>Hi i am creating instance of Calendar Using:</p>
  
  <pre><code>Calendar calendarDate=Calendar.getInstance();
              calendarDate.set(2012, 6, 1,0,0,0);
                  Date date1=calendar.getTime();
  </code></pre>
  
  <p>After that i create instance of java.util.date using:</p>
  
  <pre><code>Date date2=new Date(2012 - 1900,7-1, 01);
  </code></pre>
  
  <p>Now when i am trying to compare dates using following code: </p>
  
  <pre><code>System.out.println(date2.compareTo(date1));
  System.out.println(date1.compareTo(date2));
  </code></pre>
  
  <p>it prints -1 and 1 instead of 0(zero).<br>
  <strong>Can any one help me to find what's goes wrong ?</strong></p>