niusouti.com

1.importjava.util.*;2.publicclassTestSet{3.enumExample{ONE,TWO,THREE}4.publicstaticvoidmain(String[]args){5.Collectioncoll=newArrayList();6.coll.add(Example.THREE);7.coll.add(Example.THREE);8.coll.add(Example.THREE);9.coll.add(Example.TWO);10.coll.add(Exa

题目

1.importjava.util.*;2.publicclassTestSet{3.enumExample{ONE,TWO,THREE}4.publicstaticvoidmain(String[]args){5.Collectioncoll=newArrayList();6.coll.add(Example.THREE);7.coll.add(Example.THREE);8.coll.add(Example.THREE);9.coll.add(Example.TWO);10.coll.add(Example.TWO);11.coll.add(Example.ONE);12.Setset=newHashSet(coll);13.}14.}Whichstatementistrueaboutthesetvariableonline12?()

A.Thesetvariablecontainsallsixelementsfromthecollcollection,andtheorderisguaranteedtobepreserved.

B.Thesetvariablecontainsonlythreeelementsfromthecollcollection,andtheorderisguaranteedtobepreserved.

C.Thesetvariablecontainsallsixelementsfromthecoilcollection,buttheorderisNOTguaranteedtobepreserved.

D.Thesetvariablecontainsonlythreeelementsfromthecoilcollection,buttheorderisNOTguaranteedtobepreserved.


相似考题
更多“importjava.util.*;2.publicclassTestSet{3.enumExample{ONE,TWO,THREE}4.publicstaticvoidmai ”相关问题
  • 第1题:

    以下对枚举类型名的定义中正确的是

    A.enum a {one=9,two=-1,three};

    B.enum a={“one”, “two”, “three”};

    C.enum a {“one”, “two”, “three”};

    D.enum a={one, two, three};


    enum a{a1,a2,a3};

  • 第2题:

    5、以下对枚举类型名的定义中正确的是()。

    A.enum a={one,two,three};

    B.enum a{one=9,two,three};

    C.enum a={"one","two","three"};

    D.enum a{"one","two","three"};


    enum a {one=9,two=-1,three};

  • 第3题:

    以下对枚举类型名的定义中正确的是()。

    A.enum a={one,two,three};

    B.enum a {one=9,two=-1,three};

    C.enum a={"one","two","three"};

    D.enum a {"one","two","three"};


    A

  • 第4题:

    8、以下对枚举类型名的定义中正确的是

    A.enum a {one=9,two=-1,three};

    B.enum a={“one”, “two”, “three”};

    C.enum a {“one”, “two”, “three”};

    D.enum a={one, two, three};


    enum a{a1,a2,a3};

  • 第5题:

    7、以下对枚举类型名的定义中正确的是()。

    A.enum a={one,two,three};

    B.enum a {one=9,two=-1,three};

    C.enum a={"one","two","three"};

    D.enum a {"one","two","three"};


    enum a {one=9,two=-1,three};