CS3401 Quiz 6
Which of the following are the three major categories of Java Collections?
lists, sets, maps
| ||
hash tables, hash maps, hash sets
| ||
arraylists, linkedlists, vectors
| ||
trees, lists, maps
|
A collection that does not impose a positional order on its elements, and does not allow duplicates is called which of the following?
A hashmap
| ||
A linkedlist
| ||
A vector
| ||
A set
|
A collection whose elements are pairs of keys and values is called which of the following?
An iterator
| ||
A map
| ||
A binary tree
| ||
A heap
|
Ideally, the hash codes of two objects should be which of the following:
The should be equal when the objects belong to the same class, and different when the objects belong to different classes
| ||
They should be equal when the objects are of the same type, and different when the objects are of different types
| ||
They should be equal when the objects have equal values, and different when the objects have different values
| ||
None of the above, because it doesn't matter if they are equal or different
|
A collision occurs in a hash table when which of the following happens?
Objects whose class types are different have the same hash code
| ||
Objects whose class types are the same have different hash codes
| ||
Objects of the same class and with different values have different hash codes
| ||
Objects of the same class and with different values have the same hash code
|
Comments
Post a Comment