Java SimpleDateFormat returns unexpected result
<p>I'm trying to use SimpleDateFormat of Java to parse a String to date with the following code.</p>

<pre><code>public class DateTester {

    public static void main(String[] args) throws ParseException {
        String dateString = "2011-02-28";

        SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy");

        System.out.println(dateFormat.parse(dateString));
    }
}
</code></pre>

<p>I was expecting some parse error. But interestingly, it prints the following String.</p>

<pre><code>Wed Jul 02 00:00:00 IST 195
</code></pre>

<p>Couldn't reason it out. Can anyone help?</p>

<p>Thanks</p>
