How do you do these questions? Question 6 can have multiple answers and 7 has only one answer

Answer:
a.) str1.hashcode()==str2.hashcode();
b) x.hashcode() % bucket.length node.getvalue().equals(x)
Explanation:
a) Collision happens in a hashset when 2 distinct keys generates the same hashcode() value. And when there happens more collisions then that condition leads to the worst case of the hashmap. And the objects that are the same according to the equals method must result into the same hashcode value. Hence the above option is true. And hence, option C is correct.
b) The index of a hashset is given by x.hashcode()% bucket size
And remember hashset is a dictionary, and hence to check whether the value of a key pair is equal to object x we need to make use of .equals method. And hence the above mentioned option for b is correct. And it is D. option.