title: Creating java date object from year,month,day
body: <pre><code>int day = Integer.parseInt(request.getParameter("day"));  // 25
  int month = Integer.parseInt(request.getParameter("month")); // 12
  int year = Integer.parseInt(request.getParameter("year")); // 1988
  
  System.out.println(year);
  
  Calendar c = Calendar.getInstance();
  c.set(year, month, day, 0, 0);  
  
  b.setDob(c.getTime());
  
  System.out.println(b.getDob());  
  </code></pre>
  
  <p>Output is:</p>
  
  <blockquote>
    <p>1988<br>
    Wed Jan 25 00:00:08 IST 1989</p>
  </blockquote>
  
  <p>I am passing <code>25 12 1988</code> but I get <code>25 Jan 1989</code>. Why?</p>