void resize(int newCapacity){
  Entry[] oldTable=table;
  int oldCapacity=oldTable.length;
  if (oldCapacity == MAXIMUM_CAPACITY) {
    threshold=Integer.MAX_VALUE;
    return;
  }
  Entry[] newTable=new Entry[newCapacity];
  transfer(newTable);
  table=newTable;
  threshold=(int)(newCapacity * loadFactor);
}

void resize ( int newCapacity ) { Entry [ ] oldTable = table ; int oldCapacity = oldTable . length ; if ( oldCapacity == MAXIMUM_CAPACITY ) { threshold = Integer . MAX_VALUE ; return ; } Entry [ ] newTable = new Entry [ newCapacity ] ; transfer ( newTable ) ; table = newTable ; threshold = ( int ) ( newCapacity * loadFactor ) ; }
rehashes the contents of this map into a new array with a larger capacity . this method is called automatically when the number of keys in this map reaches its threshold . if current capacity is maximum_capacity , this method does not resize the map , but sets threshold to integer . max_value . this has the effect of preventing future calls .
