publicclassKey{privatelongid1;privatelong1d2;//classKeymethods}AprogrammerisdevelopingaclassKey,thatwillbeusedasakeyinastandard java.util.HashMap.WhichtwomethodsshouldbeoverriddentoassurethatKeyworkscorrectlyasakey?()A.publicinthashCode()B.publicbooleaneq

题目

publicclassKey{privatelongid1;privatelong1d2;//classKeymethods}AprogrammerisdevelopingaclassKey,thatwillbeusedasakeyinastandard java.util.HashMap.WhichtwomethodsshouldbeoverriddentoassurethatKeyworkscorrectlyasakey?()

A.publicinthashCode()

B.publicbooleanequals(Keyk)

C.publicintcompareTo(Objecto)

D.publicbooleanequals(Objecto)

E.publicbooleancompareTo(Keyk)


相似考题
参考答案和解析
参考答案:A, D