@Override public Object put(Object key,Object value){
  Entry tab[]=table;
  int hash=0;
  int index=0;
  if (key != null) {
    hash=System.identityHashCode(key);
    index=(hash & 0x7FFFFFFF) % tab.length;
    for (Entry e=tab[index]; e != null; e=e.next) {
      if ((e.hash == hash) && key == e.key) {
        Object old=e.value;
        e.value=value;
        return old;
      }
    }
  }
 else {
    for (Entry e=tab[0]; e != null; e=e.next) {
      if (e.key == null) {
        Object old=e.value;
        e.value=value;
        return old;
      }
    }
  }
  modCount++;
  if (count >= threshold) {
    rehash();
    tab=table;
    index=(hash & 0x7FFFFFFF) % tab.length;
  }
  Entry e=new Entry(hash,key,value,tab[index]);
  tab[index]=e;
  count++;
  return null;
}

@ Override public Object put ( Object key , Object value ) { Entry tab [ ] = table ; int hash = 0 ; int index = 0 ; if ( key != null ) { hash = System . identityHashCode ( key ) ; index = ( hash & 0x7FFFFFFF ) % tab . length ; for ( Entry e = tab [ index ] ; e != null ; e = e . next ) { if ( ( e . hash == hash ) && key == e . key ) { Object old = e . value ; e . value = value ; return old ; } } } else { for ( Entry e = tab [ 0 ] ; e != null ; e = e . next ) { if ( e . key == null ) { Object old = e . value ; e . value = value ; return old ; } } } modCount ++ ; if ( count >= threshold ) { rehash ( ) ; tab = table ; index = ( hash & 0x7FFFFFFF ) % tab . length ; } Entry e = new Entry ( hash , key , value , tab [ index ] ) ; tab [ index ] = e ; count ++ ; return null ; }
associates the specified value with the specified key in this map . if the map previously contained a mapping for this key , the old value is replaced .
