学习处理类型问题

来源:互联网 发布:海康威视报警键盘编程 编辑:程序博客网 时间:2024/06/16 11:48
public void setTroubleTime(String troubleTime){SimpleDateFormat pattern= new SimpleDateFormat("yyyy年MM月dd日HH时mm分");Date currentdate=null;try {currentdate = pattern.parse(troubleTime);} catch (ParseException e) {// TODO Auto-generated catch blockSystem.err.println("failed parseInt ");e.printStackTrace();}this.troubleTime=new Timestamp(currentdate.getTime());}