Core Java Multiple Choice Questions And Answers
Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:
List of Programming Full Forms
- 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.
17. Which class does NOT override the equals() and hashCode() methods, inheriting them directly from class Object?
- java.lang.String
- java.lang.Double
- java.lang.StringBuffer
- java.lang.Character
18. Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized?
- java.util.HashSet
- java.util.LinkedHashSet
- java.util.List
- java.util.ArrayList