Java工作常用

//list迭代器

for(StOrg stOrg:list){

if(!stOrg.getId().equals(id)){
list1.add(stOrg);}

}

//string 转 int

i=Integer.parseInt(s);


//系统当前日期时间

Date now = new Date();
DateFormat df = new SimpleDateFormat( "MM/dd/yyyy HH:mm ");
System.out.println( "At the tone, the time is " + df.format(now));

//转换成字符串

SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd" );
String str = sdf.format(new Date());



你可能感兴趣的:(java)