Why Does Java's SimpleDateFormat parse this
问题 Hi I've got a simple date format set up with a custom format string: MMddyy and I give it the following value to parse: 4 1 01 I don't think it should parse this because of the spaces but the Simple Date Format is returning the date April 4th 0001AD any ideas why? 回答1: This is expected behaviour - you are telling the DateFormat object to expect a 6 character String representation of a date and that is what you passed in. Spaces are parsed OK. However, if you used "4x1x01" you would get an