Q:

Which two statements are true about the hashCode method? (Choose two.)

0

Which two statements are true about the hashCode method? (Choose two.)


  1. The hashCode method for a given class can be used to test for object equality and object inequality for that class.
  2. The hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.
  3. The hashCode method for a given class can be used to test for object inequality, but NOT object equality for that class.
  4. The only important characteristic of the values returned by a hashCode method is that the distribution of valus must follow a Gaussian distribution.
  5. The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:


need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Core Java Multiple Choice Questions And Answers

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Which class does NOT override the equals() and has... >>
<< Which two statements are true? (Choose two)...