A: void Add(object key,object value)
B: void Clear()
C: ool Contains(object key)
D: ool ContainsValue(object value)
举一反三
- 中国大学MOOC: 以下Pair泛型类public class Pair<K, V> { public Pair(K key, V value) { this.key = key; this.value = value; } public K getKey(); { return key; } public V getValue(); { return value; } public void setKey(K key) { this.key = key; } public void setValue(V value) { this.value = value; } private K key; private V value;}经过类型擦除后,变成以下类public class Pair { public Pair(Object key, Object value) { this.key = key; this.value = value; } public Object getKey() { return key; } public Object getValue() { return value; } public void setKey(Object key) { this.key = key; } public void setValue(Object value) { this.value = value; } private Object key; private Object value;}
- 【多选题】以下属于Map接口集合常用方法的有() A. boolean containsKey(Object key) B. Collection values() C. void forEach(BiConsumer action) D. boolean replace(Object key, Object value)
- put(Object key, Object value)和get(Object key)方法分别用于向Map中存入元素和取出元素。
- 在JSON字符串中,Object结构是( )。 A: key , value B: {key:value,key:value...} C: Key D: value
- API函数( )用于从本地缓存中同步移除指定 key对应的数据。 A: wx.getStorageInfo(Object object) B: Object wx.getStorageInfoSync() C: wx.removeStorage(Object object) D: wx.removeStorageSync(string key)
内容
- 0
JComboBox中用于在指定的索引处插入选项的方法是 ( ) A: Object getItemAt(int index) B: int getItemCount() C: void addItem(Object anObject) D: void insertItemAt(Object anObject, int index)
- 1
以下( )方法将键 / 值对数据存放到散列映射中, 该方法同时返回键所对应的值。 A: public V put(K key,V value) B: public V get(Object key) C: public V remove(Object key) D: public int size()
- 2
application对象的常用方法public void setAttribute(String key, Object obj)的意义?
- 3
API函数( )用于同步获取当前storage的相关信息。 A: wx.removeStorage(Object object) B: wx.removeStorageSync(string key) C: wx.getStorageInfo(Object object) D: Object wx.getStorageInfoSync()
- 4
API函数( )用于异步获取当前storage的相关信息。 A: wx.getStorageInfo(Object object) B: Object wx.getStorageInfoSync() C: wx.removeStorage(Object object) D: wx.removeStorageSync(string key)