摘要:
map遍历:Map map = new HashMap(); Iterator it = map.entrySet().iterator(); while(it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); Object ... 阅读全文
posted @ 2015-12-16 14:20
白金05
阅读(383)
评论(0)
推荐(0)
摘要:
list 常用方法:默认添加:list.add(e);指定下标添加(添加后下标后的元素向后挪一位):list.add(index,e);获得集合内元素个数:list.size();返回是否删除:list.remove(e);直接删除指定下标的元素(只删除找到的第一个相符合的元素):list.remo... 阅读全文
posted @ 2015-12-16 14:14
白金05
阅读(2515)
评论(0)
推荐(0)
摘要:
add()和roll()区别一、Calendar月份从0-11,要表示8月,应该传入7.二、set()会自动转换为合法的日期,如set(1999,8,31)表示的是1999-09-31,9月没有31,应该为1999-10-1 三、得搞清楚add与roll区别1、add()有两条规则:a)当被修改的字... 阅读全文
posted @ 2015-12-16 13:44
白金05
阅读(184)
评论(0)
推荐(0)
摘要:
String str = " asd "; String ntr = ("A" + str).trim().substring(1);//将头部加一个字符再用trim来去空格,再去截取 System.out.println("str=\"" + str + "\""); ... 阅读全文
posted @ 2015-12-16 11:34
白金05
阅读(3080)
评论(0)
推荐(0)
摘要:
String相关函数1)substring()它有两种形式,第一种是:String substring(int startIndex)第二种是:String substring(int startIndex,int endIndex)2)concat() 连接两个字符串例:String s="Wel... 阅读全文
posted @ 2015-12-16 11:24
白金05
阅读(260)
评论(0)
推荐(0)

浙公网安备 33010602011771号