Illegal tests in SimpleDateFormat formatted

xiaoxiao2021-03-06  14

SimpleDateFormat Formater = new SimpleDateFormat ();

Formater.setlenient (FALSE);

Formater.Parse (STR);

Java can be prevented from converting the illegal date. For example: 20050344 It was originally illegal, but Parse entered the 20050413, so SETLENIENT (FALSE) can prevent this conversion.

转载请注明原文地址:https://www.9cbs.com/read-49814.html

New Post(0)