title: Comparing calendar objects
body: <p>I'm having some trouble with comparing 2 calendar objects. Here's my code:</p>
  
  <pre><code>String date = "06/19/2015";
  
  Calendar c = Calendar.getInstance();
              String days="", months="", years="";
              Scanner sc = new Scanner(date);
              sc.useDelimiter("/");
              while(sc.hasNext()){
                  months = sc.next();
                  days = sc.next();
                  years = sc.next();
              }
              int day = Integer.parseInt(days);
              int month = Integer.parseInt(months);
              int year = Integer.parseInt(years);
              System.out.println(day+" "+month+" "+year);
  
              Calendar cal = Calendar.getInstance();
              cal.set(Calendar.DAY_OF_MONTH, day);
              cal.set(Calendar.MONTH, month);
              cal.set(Calendar.YEAR, year);
  
  if(c.before(cal)){
     System.out.println("Victory!");
  }
  
              sc.close();
  </code></pre>
  
  <p>It should compare today's date with the date from the string and print out 'Vicotry!'. Problem is, it's always printing it out, even when it shouldnt... Could someone help me?</p>