1.

What are the initial capacity and load factor of HashSet?(a) 10, 1.0(b) 32, 0.75(c) 16, 0.75(d) 32, 1.0The question was asked in exam.This interesting question is from Data Structures-Set topic in section java.util – The Collections Framework of Java

Answer»

Right answer is (C) 16, 0.75

For EXPLANATION I would SAY: We should not set the initial CAPACITY too high and load factor too LOW if iteration performance is needed.



Discussion

No Comment Found

Related InterviewSolutions