【发布时间】:2015-12-17 09:59:40
【问题描述】:
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
int s = Integer.parseInt(sdf.format(new Date()).replace(":"," "));
我正在使用 integer.parseInt 将字符串中给出的时间转换为 int,但给出数字不是 calid 异常
【问题讨论】:
-
你的输入字符串在哪里,格式为 "HH:mm:ss" ???