23/12/2013 is mapping with MM/dd/yyyy format why, why not ParseException

后端 未结 5 570
野性不改
野性不改 2021-01-28 10:20

Can anybody help?

public void dateCalender() throws ParseException{
        System.out.println(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.ENGLISH).parse(\"120/1         


        
5条回答
  •  故里飘歌
    2021-01-28 10:55

    From the documentation:

    public void setLenient(boolean lenient)
    

    You need to set the format to be non-lenient.

提交回复
热议问题