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.0

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