摘要: 1,使用普通的旧的Hashtable HashMap允许null作为key,而Hashtable不可以2,使用Collections中同步化的包装方法synchronizedMap3,使用concurrent包下的ConcurrentHashMap//Hashtable Example CodeMap threadSafeMap = new Hashtable();//synchronizedMap Example Code.threadSafeMap = Collections.synchronizedMap(new HashMap());//ConcurrentHashMap Examp. 阅读全文
posted @ 2014-04-10 21:46 知了小巷 阅读(3079) 评论(0) 推荐(0)