复制内容到剪贴板 程序代码
public class SplitString {
public static void main(String[] args) {
String context="sasdacont###page###extasdsaas###page###ddsaasdasd###page###saasdsasdadsadsa2131";
String[] subString = context.split("###page###");
int pageFlagNum = subString.length-1;
public static void main(String[] args) {
String context="sasdacont###page###extasdsaas###page###ddsaasdasd###page###saasdsasdadsadsa2131";
String[] subString = context.split("###page###");
int pageFlagNum = subString.length-1;
jdk中已经不再推荐用Date.parse(String arg);这样的直接的转换,取而代之的是:
复制内容到剪贴板 程序代码
String birthdayS = request.getParameter("birthday");
DateFormat f=new SimpleDateFormat("yyyy-MM-dd");
try {
birthday=f.parse(birthdayS);
} catch (ParseException e) {
e.printStackTrace();
log.error("When format birthday from String to Date is error");
}
DateFormat f=new SimpleDateFormat("yyyy-MM-dd");
try {
birthday=f.parse(birthdayS);
} catch (ParseException e) {
e.printStackTrace();
log.error("When format birthday from String to Date is error");
}
08-06
19
The method setValue(String) in the type BaseInputTag is not applicable for the arguments (double)
作者:Java伴侣 日期:2008-06-19
复制内容到剪贴板 程序代码
Locale locale = Locale.US;
Date now=new Date();
SimpleDateFormat f=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss",locale);
String showTime=f.format(now);
//String s="2007-12-10 03:30:08 ";
//java.text.DateFormat f1=new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm:ss",locale);
//java.util.Date showTime=f.parse(s);
Date now=new Date();
SimpleDateFormat f=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss",locale);
String showTime=f.format(now);
//String s="2007-12-10 03:30:08 ";
//java.text.DateFormat f1=new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm:ss",locale);
//java.util.Date showTime=f.parse(s);