摘要: 转自:http://blog.csdn.net/rosanu_blog/article/details/9002804Map是java中的接口,Map.Entry是Map的一个内部接口。java.util.Map.Entry接口主要就是在遍历map的时候用到。Map提供了一些常用方法,如keySet... 阅读全文
posted @ 2015-03-25 15:04 lintong 阅读(2897) 评论(0) 推荐(0) 编辑
摘要: How to iterate over the entries of a Map?What is the order of iteration- if you are just usingMap, then strictly speaking, there areno ordering guaran... 阅读全文
posted @ 2015-03-25 15:01 lintong 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://blog.csdn.net/guijava/article/details/3784658 在java5中新增加了java.util.Queue接口,用以支持队列的常见操作。Queue接口与List、Set同一级别,都是继承了Collection接口。Queue使用时要尽量避免... 阅读全文
posted @ 2015-03-25 11:45 lintong 阅读(43571) 评论(0) 推荐(1) 编辑
摘要: HashMap和Hashtable的区别HashMap和Hashtable都实现了Map接口,但决定用哪一个之前先要弄清楚它们之间的分别。主要的区别有:线程安全性,同步(synchronization),以及速度。HashMap几乎可以等价于Hashtable,除了HashMap是非synchron... 阅读全文
posted @ 2015-03-24 17:44 lintong 阅读(7104) 评论(0) 推荐(1) 编辑