Help with Java Calendar -- it is giving some strange output
<p>I'm newish to Java and am trying to do somethings with dates.  First I started using the Date class, which I found out was mostly deprecated so I switched over to Calendar.  </p>

<p>Now I am getting weird values.  for example the Month value for December is 0, not 12.  And on those Calendars where it is giving me 0 for December it is also moving the year ahead one year.</p>

<p>It's weird!  </p>

<p>What am I missing? </p>

<p>Thanks for your help.</p>

<p>-GG</p>

<p>EDIT FOR AN EXAMPLE:</p>

<p>So I am reading some line sin from a file such as this:
Johnny Graham H F 12-2-1973 Black</p>

<p>I parse it, and then for the Calendar I set:</p>

<pre><code>int year = Integer.parseInt(stringVersionOfYear); // this value is 1973
</code></pre>

<p>Then later when I go to get the year back with a line like this:</p>

<pre><code>calendar.get(Calendar.YEAR)
</code></pre>

<p>the value is 1974...  And the month is 0 for 
<code>cal.get(Calendar.MONTH)</code></p>

<p>EDIT 2:</p>

<p>I am creating the Calendar like this:</p>

<pre><code>Calendar outputCalendar = Calendar.getInstance();
outputCalendar.set(year, month, day);
</code></pre>
