SSH出错之--java.text.ParseException: Format.parseObject,String failed

java.text.ParseException: Format.parseObject(String) failed

---------------------

DateFormat df = new SimpleDateFormat ("yyyy-MM-dd");

Date d1 = df.parse("2001-01-01");

System.out.println(d1.toString());

这是对的,格式要一致,输入的时候必须按yyyy-MM-dd的格式输入。