String str = "2007/93";
boolean convertSuccess = true;
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM");
try {
//关键语句
format.setLenient(false);
format.parse(str);
} catch (ParseException e) {
convertSuccess = false;
System.out.println("error");
}