Which two statements are true about the hashCode method? (Choose two.)
- The hashCode method for a given class can be used to test for object equality and object inequality for that class.
- The hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.
- The hashCode method for a given class can be used to test for object inequality, but NOT object equality for that class.
- The only important characteristic of the values returned by a hashCode method is that the distribution of valus must follow a Gaussian distribution.
- 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.
Correct Answer:
need an explanation for this answer? contact us directly to get an explanation for this answer