Map.containsKey(Object key)
Returns true if this map contains a mapping for the specified key试验一下这个方法

解决方案 »

  1.   

    java.util 
    Interface MapcontainsKey
    public boolean containsKey(Object key)
    Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains at a mapping for a key k such that (key==null ? k==null : key.equals(k)). (There can be at most one such mapping.) Parameters:
    key - key whose presence in this map is to be tested. 
    Returns:
    true if this map contains a mapping for the specified key. 
    Throws: 
    ClassCastException - if the key is of an inappropriate type for this map (optional). 
    NullPointerException - if the key is null and this map does not not permit null keys (optional).
      

  2.   

    Y的过分本来我第一的结果CSDN又"超出通讯量范围"了
      

  3.   

    method name:containsKey
    public boolean containsKey(Object key) Returns true if this map contains a mapping for the specified key.example:
    HashMap map = new HashMap();
    map.containsKey(key);
      

  4.   

    java.util 
    Interface MapcontainsKey
    public boolean containsKey(Object key)
    Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains at a mapping for a key k such that (key==null ? k==null : key.equals(k)). (There can be at most one such mapping.) Parameters:
    key - key whose presence in this map is to be tested. 
    Returns:
    true if this map contains a mapping for the specified key. 
    Throws: 
    ClassCastException - if the key is of an inappropriate type for this map (optional). 
    NullPointerException - if the key is null and this map does not not permit null keys (optional).