SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
sdf.format(str);//str是时间字符串
在IDEA的内,在没有抛出
throws ParseException
的时候就会报unhandled exception :java.text.parseException的错误
本文探讨了在IntelliJ IDEA中使用SimpleDateFormat格式化时间字符串时遇到的unhandled exception: java.text.ParseException问题。该问题发生在未捕获ParseException的情况下,并提供了一个具体的代码示例。
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
sdf.format(str);//str是时间字符串
在IDEA的内,在没有抛出
throws ParseException
的时候就会报unhandled exception :java.text.parseException的错误