YouwanttouseteCoherenceJavaAPIstodirectlycachedPOJOs.Considerthissnippetofcode:NamedCachecache-CacheFactory.getCache("mycache");cache.put(newInteger(I)f"hello");cache.put(T,"hi");cache.put(newLong(II),"hey");Thiscodeinsertsthreeobjectsintothecache.Why?()A

题目

YouwanttouseteCoherenceJavaAPIstodirectlycachedPOJOs.Considerthissnippetofcode:NamedCachecache-CacheFactory.getCache("mycache");cache.put(newInteger(I)f"hello");cache.put(T,"hi");cache.put(newLong(II),"hey");Thiscodeinsertsthreeobjectsintothecache.Why?()

A.hashCode()andequals()methodforeachobjecttypeisdifferentsoadifferentkeyisused

B.eachobjectvaluestringisdifferentsoadifferentvalueisinsertedoneachput

C.equals()andcompare()methodisdifferentforeachput

D.POFneedtobeimplementedforthistoworkproperly


相似考题