单选题下列Map的泛型声明中正确的是哪项?()A Map〈String〉B Map〈String,String〉C Map(String)D Map()

题目
单选题
下列Map的泛型声明中正确的是哪项?()
A

Map〈String〉

B

Map〈String,String〉

C

Map(String)

D

Map()


相似考题

3.阅读以下说明和c++代码,将应填入 (n) 处的字句写在答题纸的对应栏内。【说明】c++标准模板库中提供了map模板类,该模板类可以表示多个“键一值”对的集合,其中键的作用与普通数组中的索引相当,而值用作待存储和检索的数据。此外,c++模板库还提供了pair模板类,该类可以表示一个“键-值”对。pair对象包含两个属性:first和second,其中first表示“键-值”中的“键”,而Second表示“键-值”中的“值”。map类提供了insert方法和find方法,用于插入和查找信息。应用时,将一个pair。对象插入(insert)到map对象后,根据“键”在map对象中进行查找(find),即可获得一个指向pair对象的迭代器。下面的c++代码中使用了map和pair模板类,将编号为1001、1002、1003的员工信息插入到map对象中,然后输入一个指定的员工编号,通过员工编号来获取员工的基本信息。员工编号为整型编码,员工的基本信息定义为类employee。map对象与员工对象之间的关系及存储结构如图5—1所示。【c++代码】includeincludeincludeusing namespace std;class employee {(1) :employee(string name,string phoneNumber,string address){this->name=name;this->phoneNumber=phoneNumber ;this->address=address;}string name;string phoneNumber;string address;);int main(){mapemployeeMap;typedef pair>employeeNo; //从标准输入获得员工编号map::const_iterator it;it= (5) .find(employeeNo); //根据员工编号查找员工信息if(it==employeeMap.end()){cout<first<second一>nafae(phoneNumber<second->address<

参考答案和解析
正确答案: B
解析: 暂无解析
更多“单选题下列Map的泛型声明中正确的是哪项?()A Map〈String〉B Map〈String,String〉C Map(String)D Map()”相关问题
  • 第1题:

    ASA/PIXversion7.0introducedModularPolicyFramework(MPF)asanextensiblewaytoclassifytraffic,andthenapplypolicies(oractions)tothattraffic.MPFataminimum requireswhichthreecommands?()

    A.http-map,tcp-map,class-map

    B.class-map,tcp-map,policy-map

    C.class-map,policy-map,service-map

    D.class-map,service-policy,policy-map


    参考答案:D

  • 第2题:

    如果对端的IP地址是1.1.1.2,电话号码是886401,Dialer map应配置为()

    • A、Dialer map 1.1.1.2 886401
    • B、Dialer map 886401 1.1.1.2
    • C、Dialer map ip 1.1.1.2 886401
    • D、Dialer map ip 1.1.1.2 string 886401

    正确答案:C

  • 第3题:

    ASA/PIXversion 7.0 introduced ModularPolicyFramework (MPF) as anextensible wayto classify traffic,and then apply policies (or actions) to that traffic. MPF at aminimum requires which three commands?()

    • A、 http-map, tcp-map, class-map
    • B、 class-map, tcp-map, policy-map
    • C、 class-map, policy-map, service-map
    • D、 class-map, service-policy, policy-map

    正确答案:D

  • 第4题:

    public class Person {  private name;  public Person(String name) {  this.name = name;  }  public int hashCode() {  return 420;  }  }  Which is true?() 

    • A、 The time to find the value from HashMap with a Person key depends on the size of the map.
    • B、 Deleting a Person key from a HashMap will delete all map entries for all keys of typePerson.
    • C、 Inserting a second Person object into a HashSet will cause the first Person object to beremoved as a duplicate.
    • D、 The time to determine whether a Person object is contained in a HashSet is constant and does NOT depend on the size of the map.

    正确答案:A

  • 第5题:

    下列微管结合蛋白中只存在于树突的是()

    • A、MAP1 
    • B、MAP2 
    • C、MAP4 
    • D、tau蛋白

    正确答案:B

  • 第6题:

    在以下所列的信令组合中,()是GSM网络所专用的。

    • A、MAP,BSSAP,TUP
    • B、MAP,BSSAP,ISUP,SCCP
    • C、MAP,BSSAP,TCAP,SCCP,MTP
    • D、MAP,SCCP,BSSAP,INAP

    正确答案:C

  • 第7题:

    下面关于MAP说法正确的有()

    • A、MAP=1/3SBP+2/3DBP
    • B、MAP=DBP+1/3脉压
    • C、MAP=CO×SVR
    • D、MAP=(SBP+DBP)/2
    • E、MAP=(2DBP+SBP)×1/3

    正确答案:A,B,C,E

  • 第8题:

    下列Map的泛型声明中正确的是哪项?()  

    • A、Map〈String〉
    • B、Map〈String,String〉
    • C、Map(String)
    • D、Map()

    正确答案:B

  • 第9题:

    多选题
    Given: 11. Which three EL expressions are valid and evaluate to true?()
    A

    ${not map.c}

    B

    ${map.d or map.a}

    C

    ${map.a and map.d}

    D

    ${map.false or map.true}

    E

    ${map.a and map.b or map.a}


    正确答案: E,A
    解析: 暂无解析

  • 第10题:

    单选题
    What is the purpose of the inverse ARP?()
    A

    to map a known DLCI to an IP address

    B

    to map a known IP address to a MAC address

    C

    to map known SPID to a MACaddress

    D

    to map a known DLCI to a MAC address

    E

    to map a known IP address to a SPID

    F

    to map a known MAC address to an IP address


    正确答案: A
    解析: 暂无解析

  • 第11题:

    多选题
    Given: 11. 16. Which three EL expressions, inserted at line 16, are valid and evaluate to "d"?()
    A

    ${map.c}

    B

    ${map[c]}

    C

    ${map[c]}

    D

    ${map.map.b}

    E

    ${map[map.b]}


    正确答案: A,C
    解析: 暂无解析

  • 第12题:

    单选题
    下列Map的泛型声明中正确的是哪项?()
    A

    Map〈String〉

    B

    Map〈String,String〉

    C

    Map(String)

    D

    Map()


    正确答案: B
    解析: 暂无解析

  • 第13题:

    What is the purpose of the inverse ARP?()

    • A、to map a known DLCI to an IP address
    • B、to map a known IP address to a MAC address
    • C、to map known SPID to a MAC address
    • D、to map a known DLCI to a MAC address
    • E、to map a known IP address to a SPID
    • F、to map a known MAC address to an IP address

    正确答案:A

  • 第14题:

    对于Map("book"->5,"pen"->2).map(m=>m._1->m._2*2)结果说法正确的是?()

    • A、Map("bookbook"->5,"penpen"->2)
    • B、Map("bookbook"->10,"penpen"->4)
    • C、Map("book"->10,"pen"->4)
    • D、Map("book"->5,"pen"->2,"book"->5,"pen"->2)

    正确答案:C

  • 第15题:

    Given: 11.<% java.util.Map map = new java.util.HashMap(); 12.request.setAttribute("map", map); 13.map.put("a", "b"); 14.map.put("b", "c"); 15.map.put("c", "d"); %> 16.<%-- insert code here --%> Which three EL expressions, inserted at line 16, are valid and evaluate to "d"?()

    • A、${map.c}
    • B、${map[c]}
    • C、${map["c"]}
    • D、${map.map.b}
    • E、${map[map.b]}

    正确答案:A,C,E

  • 第16题:

    下面哪种是正确的创建Map集合的方式()。

    • A、Map m=new Map();
    • B、Map m=new Map(init capacity,increment capacity);
    • C、Map m=new Map(new Collection());
    • D、Map是接口,所以不能实例化。

    正确答案:D

  • 第17题:

    What is the purpose of the inverse ARP?()

    • A、to map a known DLCI to an IP address
    • B、to map a known IP address to a MAC address
    • C、to map known SPID to a MACaddress
    • D、to map a known DLCI to a MAC address
    • E、to map a known IP address to a SPID
    • F、to map a known MAC address to an IP address

    正确答案:A

  • 第18题:

    线程安全的map在JDK 1.5及其更高版本环境有哪几种方法可以实现()。

    • A、Map map = new HashMap()
    • B、Map map = new TreeMap()
    • C、Map map = new ConcurrentHashMap()
    • D、Map map = Collections.synchronizedMap(new HashMap())

    正确答案:C,D

  • 第19题:

    Given: 11.<% java.util.Map map = new java.util.HashMap(); 12.request.setAttribute("map", map); 13.map.put("a", "true"); 14.map.put("b", "false"); 15.map.put("c", "42"); %> Which three EL expressions are valid and evaluate to true?()

    • A、${not map.c}
    • B、${map.d or map.a}
    • C、${map.a and map.d}
    • D、${map.false or map.true}
    • E、${map.a and map.b or map.a}

    正确答案:A,B,E

  • 第20题:

    单选题
    public class Person {  private name;  public Person(String name) {  this.name = name;  }  public int hashCode() {  return 420;  }  }  Which is true?()
    A

     The time to find the value from HashMap with a Person key depends on the size of the map.

    B

     Deleting a Person key from a HashMap will delete all map entries for all keys of typePerson.

    C

     Inserting a second Person object into a HashSet will cause the first Person object to beremoved as a duplicate.

    D

     The time to determine whether a Person object is contained in a HashSet is constant and does NOT depend on the size of the map.


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    ASA/PIXversion 7.0 introduced ModularPolicyFramework (MPF) as anextensible wayto classify traffic,and then apply policies (or actions) to that traffic. MPF at aminimum requires which three commands?()
    A

     http-map, tcp-map, class-map

    B

     class-map, tcp-map, policy-map

    C

     class-map, policy-map, service-map

    D

     class-map, service-policy, policy-map


    正确答案: A
    解析: 暂无解析

  • 第22题:

    单选题
    What is the purpose of the inverse ARP?()
    A

    to map a known DLCI to an IP address

    B

    to map a known IP address to a MAC address

    C

    to map known SPID to a MAC address

    D

    to map a known DLCI to a MAC address

    E

    to map a known IP address to a SPID

    F

    to map a known MAC address to an IP address


    正确答案: C
    解析: 暂无解析

  • 第23题:

    多选题
    Given: 11. 16. Which three EL expressions, inserted at line 16, are valid and evaluate to "d"?()
    A

    ${map.c}

    B

    ${map[c]}

    C

    ${map[c]}

    D

    ${map.map.b}

    E

    ${map[map.b]}


    正确答案: E,D
    解析: 暂无解析

  • 第24题:

    单选题
    下面哪种是正确的创建Map集合的方式()。
    A

    Map m=new Map();

    B

    Map m=new Map(init capacity,increment capacity);

    C

    Map m=new Map(new Collection());

    D

    Map是接口,所以不能实例化。


    正确答案: C
    解析: 暂无解析