解释一句代码的含义(hashtable中的)
public synchronized boolean containsKey(Object key) {Entry tab[] = table;int hash = key.hashCode();int index = (hash & 0x7FFFFFFF) % tab.length;for (Entry<K,V> e = tab[index] ; e != null ; e = e.next) { if ((e.hash == hash) && e.key.equals(key)) {return true; }}return false; }
======================
int index = (hash & 0x7FFFFFFF) % tab.length; 请教这句是什么意思??函数的意思是判断Hashtable中是否包含对应key值 谢谢 1 楼 dnglee 2008-03-24 转成正整数求余