java基础之字符串

*、字符串操作之substring

public String substring(int beginIndex,int endIndex)
重点:包前,不包后;

*、字符串操作之转成Date

     public Date tranStrToDate() {
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd       HH:mm:ss");
         Date date = null;
         date = format.parse(str);
         return date;
}

猜你喜欢

转载自lbovinl.iteye.com/blog/2334464
今日推荐