Why This code inserts three objects into the cache?

You want to use the Coherence Java APIs to directly cache POJOs. Consider this snippet of
code:
NamedCache cache – CacheFactory.getCache(“mycache”);
cache.put(new Integer(l)f “hello”);
cache.put(T, “hi”);
cache.put(new Long(ll), “hey”);
This code inserts three objects into the cache. Why?

You want to use the Coherence Java APIs to directly cache POJOs. Consider this snippet of
code:
NamedCache cache – CacheFactory.getCache(“mycache”);
cache.put(new Integer(l)f “hello”);
cache.put(T, “hi”);
cache.put(new Long(ll), “hey”);
This code inserts three objects into the cache. Why?

A.
hash Code() and equals() method for each object type is different so a different key is
used

B.
Each object value string is different so a different value is inserted on each put

C.
equals () and compare() method is different for each put

D.
POF needs to be implemented for this to work properly



Leave a Reply 0

Your email address will not be published. Required fields are marked *