网友您好, 请在下方输入框内输入要搜索的题目:
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
参考答案