关于SimpleDateFormat的parse函数抛异常的问题?
请问下面的代码运行时会抛异常么,为什么?
package november;
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class TestParse {
public static void main(String[] args) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
System.out.println(sdf.parse("2007-09-06"));
}
}