
588 • Java Programming
Multiple Choice Questions
1. A hash table can store a maximum of 10 records.
Currently there are records in location 1, 3, 4,
7, 8, 9, and 10. The probability of a new record
going into location 2, with a hash function resolv-
ing collisions by linear probing is:
(a) 0.6 (c) 0.2
(b) 0.1 (d) 0.5
2. The HashMap class automatically resizes its
hash table when the load factor reaches a specifi c
threshold. This threshold value can be set by:
( a) public HashMap (int initialCa-
pacity, float loadFactor)
( b) public HashMap (int initial
size, float loadFactor)
( c) public HashMap (int initial ...