更多“List、Map、Set 三个接口,存取元素时,各有什么特点?”相关问题
  • 第1题:

    下列关于List接口的描述中,错误的是?()

    A.List接口继承自Collection接口,是单列集合

    B.List集合中允许出现重复的元素

    C.List集合存储元素是有序的,即元素的存入顺序和取出顺序一致

    D.List集合中所有的元素是以二叉树方式进行存储的


    答案:D
    解析:List集合中所有的元素是以线性方式进行存储的

  • 第2题:

    Refer to the exhibit. Which three statements accurately describe the result of applying the exhibited route map?()

    A. The map prohibits th e redistribution of all type 2 external OSPF routes.

    B. All routes that do no match clauses 10 and 20 of the route map are redistributed with their tags set to 8.

    C. The map prohibits the redistribution of all external OSPF routes with tag 6 set.

    D. Th e map permits the redistribution of all type 1 external OSPF routes.

    E. The map redistributes into EIGRP all routes that match the pfx prefix list and the five metric values?0000, 1000, 255, 1, and 1500.

    F. The map prohibits the redistribution of all ty pe 2 external OSPF routes with tag 6 set.


    参考答案:B, D, F

  • 第3题:

    Collection有两个子接口分别是List和Set,List集合的特点是(),Set集合的特点是()


    正确答案:有序、可重复;无序、不可重复

  • 第4题:

    关于Hibernate中关系的说话正确的是()

    • A、一对多必须用Set来映射
    • B、多对一必须用Set来映射
    • C、一对多可以用Set来映射,也可以用List、Map来映射
    • D、多对一必须用Set来映射,也可以用List、Map来映射

    正确答案:C

  • 第5题:

    关于java集合说法,哪几个是正确的()

    • A、List集合中数据可以重复
    • B、Set集合中数据可以重复
    • C、Map集合是键值对的形式存储的数据
    • D、Set集合和List集合没有区别

    正确答案:A,C

  • 第6题:

    如何创建一个List或Set对象?使用它们存放数据时哪种对象不能存放重复元素?


    正确答案:可以使用关键字new调用相应构造函数创建List或Set对象。
    (1)要创建List对象时可使用以下方法:Listlist=newArrayList();或ArrayListarraylist=newArrayList();或LinkedListlinkedlist=newLinkedList();等等。
    (2)要创建Set对象则调用相应的构造函数:HashSethashset=newHashSet();等。Set定义的集合中不能包含相同的元素。

  • 第7题:

    List,Set,Map是否继承自Collection接口?


    正确答案: List,Set是Map不是

  • 第8题:

    Which of these statements concerning the collection interfaces are true?()  

    • A、Set extends Collection.
    • B、All methods defined in Set are also defined in Collection.
    • C、List extends Collection.
    • D、All methods defined in List are also defined in Collection.
    • E、Map extends Collection.

    正确答案:A,B,C

  • 第9题:

    填空题
    Collection有两个子接口分别是List和Set,List集合的特点是(),Set集合的特点是()

    正确答案: 有序、可重复,无序、不可重复
    解析: 暂无解析

  • 第10题:

    问答题
    集合中的List,Set,Map有什么区别

    正确答案: List的特点是元素有序、元素可重复。List接口的主要实现类有ArrayList和LinkedList。Set的特点是元素无序、元素不可重复。Set接口的主要实现类有HashSet和TreeSet。Map的特点是存储的元素是键(Key)、值(Value)映射关系,元素都是成对出现的。Map接口的主要实现类有HashMap和TreeMap
    解析: 暂无解析

  • 第11题:

    问答题
    List,Set,Map是否继承自Collection接口?

    正确答案: List,Set是Map不是
    解析: 暂无解析

  • 第12题:

    ( 难度:中等)关于容器下面说法正确的是? ( )
    A.A:列表(List)和集合(Set)存放的元素都是可重复的
    B.B:列表(List)和集合(Set)存放的元素都是不可重复的
    C.C:映射(Map)<key,value>中key是可以重复的
    D.D:映射(Map)<key,value>中value是可以重复的

    答案:D

  • 第13题:

    A policy needs to be implemented on Router B so that any traffic sourced from 172.16.10.0/24 will be forwarded to Router C. Which configuration on Router B will achieve the desired effect?()

    A.access - list 1 permit 172.16.10.0 0.0.0.255 ! interface e0 ip policy route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 1 72.16.14.4

    B.access - list 1 permit 172.16.10.0 0.0.0.255 ! interface s0 ip policy route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 172.16.12.3

    C.access - list 1 permit 172.16.10.0 0.0.0.255 ! interface e0 ip polic y route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 172.16.12.2

    D.access -list 1 deny 172.16.10.0 0.0.0.255 ! interface s0 ip policy route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 172.16.12.2


    参考答案:B

  • 第14题:

    WhatistheorderofpreferenceforthesecommandswhenallofthemareappliedtooneneighborintheBGPinboundfilterdirection?()

    A.prefix-list,route-map,filter-list,distributelist

    B.route-map,filter-list,prefix-list,distribute-list

    C.route-map,distribute-list,prefix-list,filter-list

    D.filter-list,prefixlist,route-map,distributelist

    E.distributelist,prefix-list,route-map,fitterlist


    参考答案:B

  • 第15题:

    What is the order of preference for these commands when all of them are applied to one neighbor in theBGP inbound filter direction?()

    • A、prefix-list, route-map, filter-list, distribute list
    • B、route-map, filter-list, prefix-list, distribute-list
    • C、route-map, distribute-list, prefix-list, filter-list
    • D、filter-list, prefix list, route-map, distribute list
    • E、distribute list, prefix-list, route-map, fitter list

    正确答案:B

  • 第16题:

    以下有关集合的说法中,其中正确的是()

    • A、List集合中数据可以重复
    • B、Set集合中数据可以重复
    • C、Map集合是键值对的形式存储的数据
    • D、Set集合和List集合没有区别

    正确答案:A,C

  • 第17题:

    集合中的List,Set,Map有什么区别


    正确答案:List的特点是元素有序、元素可重复。List接口的主要实现类有ArrayList和LinkedList。Set的特点是元素无序、元素不可重复。Set接口的主要实现类有HashSet和TreeSet。Map的特点是存储的元素是键(Key)、值(Value)映射关系,元素都是成对出现的。Map接口的主要实现类有HashMap和TreeMap

  • 第18题:

    关于集合框架特征,说法不正确的是()

    • A、Map集合中的键对象不允许重复
    • B、有序List集合中的元素允许重复
    • C、有序Set集合中的元素不允许重复
    • D、无序Collection集合中的元素允许重复、无序

    正确答案:A

  • 第19题:

    染色体的三个基本元素各有什么特点和功能?


    正确答案:(1)自主复制DNA序列(ARS):具有一段11-14bp的同源性很高的富含AT的共有序列及其上下游各200bp左右的区域是维持ARS功能所必需的;
    (2)着丝粒DNA序列(CEN):共同点是两个相邻的核心区,80-90bp的AT区,11bp的保守区;
    (3)端粒DNA序列:端粒序列的复制。

  • 第20题:

    List接口的特点是哪项?()

    • A、不允许重复元素,元素有顺序
    • B、不允许重复元素,元素无顺序
    • C、允许重复元素,元素有顺序
    • D、允许重复元素,元素无顺序

    正确答案:C

  • 第21题:

    单选题
    What is the order of preference for these commands when all of them are applied to one neighbor in theBGP inbound filter direction?()
    A

    prefix-list, route-map, filter-list, distribute list

    B

    route-map, filter-list, prefix-list, distribute-list

    C

    route-map, distribute-list, prefix-list, filter-list

    D

    filter-list, prefix list, route-map, distribute list

    E

    distribute list, prefix-list, route-map, fitter list


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

  • 第22题:

    单选题
    关于Hibernate中关系的说话正确的是()
    A

    一对多必须用Set来映射

    B

    多对一必须用Set来映射

    C

    一对多可以用Set来映射,也可以用List、Map来映射

    D

    多对一必须用Set来映射,也可以用List、Map来映射


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

  • 第23题:

    单选题
    List接口的特点是哪项?()
    A

    不允许重复元素,元素有顺序

    B

    不允许重复元素,元素无顺序

    C

    允许重复元素,元素有顺序

    D

    允许重复元素,元素无顺序


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