java中 Date 转 String 其他方法

来源:互联网 发布:能美图的拍照软件 编辑:程序博客网 时间:2024/05/29 17:59

java中 Date 转 String 其他方法 如下:

System.out.println(String.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS", new Date()));

 

 

private static final String SPLIT_EXC_STR = " 异常 时间: {0} ip: {1}操作员: {2} ";

 

 

MessageFormat.format(SPLIT_EXC_STR, new String[] { "1985-10-10","192.168.0.0","110"})

 

 

struts2 中 sif  s:if 可以用string中所有的方法

<s:if test="#session.obj.nam.startWith("123")">

原创粉丝点击