package util; /** * 验证码生成类 */ import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Random; public class CheckCode { public String getCheckCode(){ Random random = new Random(); String sRand=""; for (int i=0;i<4;i++){ String rand=String.valueOf(random.nextInt(10)); sRand+=rand; } return sRand; } public static void main(String[] args) { String timeStr="2011-10-18 15:24:25"; DateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date=null; long timeLong=0; long timeAdded=0; try{ date=df.parse(timeStr); timeLong=date.getTime(); System.out.println("long:"+timeLong); Calendar c=Calendar.getInstance(); c.setTime(date); c.add(Calendar.MINUTE,40); timeAdded=c.getTimeInMillis(); System.out.println("Added time:"+c.getTime()); System.out.println("Added 40 minutes:"+timeAdded); }catch(ParseException e){ e.printStackTrace(); } } }

asddwh LV13
2023年12月29日
hongdongdong LV14
2023年6月17日
3038606153 LV1
2023年4月14日
微信网友_5768552477921280 LV6
2022年11月2日
qwqiwiw LV4
2022年7月18日
263648 LV7
2022年6月23日
JohnssyWT LV1
2022年6月10日
我睡觉时不困 LV7
2022年6月5日
zzfzzf LV7
2022年4月22日
wanglinddad LV55
2022年4月8日

不错不
2024年10月10日
暂无贡献等级
TY0165 LV20
2024年6月24日
15719908287 LV9
2024年6月19日
yuanmaxiazai LV2
2024年6月19日
微信网友_7041475584184320
2024年6月17日
暂无贡献等级
微信网友_7009341063450624
2024年6月1日
暂无贡献等级
玖零定制问题修复 LV34
2024年4月4日
呀呀呀yayayawawawa
2024年1月12日
暂无贡献等级
Liang朝伟 LV1
2024年1月6日
yangyangyangyangzzzz LV1
2024年1月3日