Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what happens when we add the objects morethan the size limit
to a hashmap



what happens when we add the objects morethan the size limit to a hashmap..

Answer / kanu butani

When the number of entries in the hash table exceeds the
product of the load factor and the current capacity, the
hash table is rehashed (that is, internal data structures
are rebuilt) so that the hash table has approximately twice
the number of buckets.
As a general rule, the default load factor (.75) offers a
good tradeoff between time and space costs. Higher values
decrease the space overhead but increase the lookup cost
(reflected in most of the operations of the HashMap class,
including get and put). The expected number of entries in
the map and its load factor should be taken into account
when setting its initial capacity, so as to minimize the
number of rehash operations. If the initial capacity is
greater than the maximum number of entries divided by the
load factor, no rehash operations will ever occur.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is hashset ordered?

0 Answers  


What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?

0 Answers  


Tell me about your ability to work under pressure

0 Answers   AXA,


What is java full form?

0 Answers  


Name the types of 'priority'?

2 Answers  


Differentiate between a class and an object.

0 Answers  


How many bits is a double?

0 Answers  


Is c better than java?

0 Answers  


write a code, we have two thread, one is printing even no and other print the odd no.

1 Answers   Global Logic,


if am have 100 threads(for ex:T1,T2---T100) how we give priority to these threads and how the system excute these threads

2 Answers  


I want to know the host name and provider name for tcs web mail

5 Answers   RSG, TCS,


What is the use of coding?

0 Answers  


Categories