//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中处理集合及日期的基本方法,包括如何使用迭代器遍历List并过滤元素,如何将String类型转换为int类型,以及如何获取并格式化当前系统日期时间。这些技能对于Java初学者和日常开发工作都非常实用。
125

被折叠的 条评论
为什么被折叠?



