8
任务
Java Collections,  第 4 级课程 6
已锁定
Weak references
Analyze the example. Inside the main method, create a Monkey object and then create a weak reference (WeakReference) to it.
14
任务
Java Collections,  第 4 级课程 6
已锁定
Cache based on SoftReference
Implement the SoftCache class's get, put, and remove methods: The AnyObject get(Long key) method must return an AnyObject from cacheMap using key. If key isn't in cacheMap, then return null. The AnyObject put(Long key, AnyObject value) method must add a key-value pair to the map.