Objects and Collections - Programming

Q1:

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

A java.lang.String

B java.lang.Double

C java.lang.StringBuffer

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.