Objects and Collections

Q1: Which class does not override the equals() and hashCode() methods, inheriting them directly from class Object?

A java.lang.StringBuffer

B java.lang.String

C java.lang.Double

D java.lang.Character

ANS:C - java.lang.StringBuffer

java.lang.StringBuffer is the only class in the list that uses the default methods provided by class Object.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.