Why SimpleDateFormat does not throw exception for invalid format?

Viewed 2900
import java.text.ParseException;

public class Hello {

    public static void main(String[] args) throws ParseException {
        System.out.println(new java.text.SimpleDateFormat("yyyy-MM-dd").parse("23-06-2015"));
    }
}

why this returns Sun Dec 05 00:00:00 GMT 28 I am expecting an exception.

1 Answers
Related