单选题Which statement is true for the class java.util.ArrayList?()AThe elements in the collection are ordered.BThe collection is guaranteed to be immutable.CThe elements in the collection are guaranteed to be unique.DThe elements in the collection are access

题目
单选题
Which statement is true for the class java.util.ArrayList?()
A

 The elements in the collection are ordered.

B

 The collection is guaranteed to be immutable.

C

 The elements in the collection are guaranteed to be unique.

D

 The elements in the collection are accessed using a unique key.

E

 The elements in the collections are guaranteed to be synchronized.


相似考题
更多“Which statement is true for the class java.util.ArrayList?()”相关问题
  • 第1题:

    Which the statement is true?()

    • A、 The Error class is a Runtime Exception.
    • B、 No exceptions are subclasses of Error.
    • C、 Any statement that may throw an Error must be enclosed in a try block.
    • D、 any statement that may throw an Exception must be enclosed in a try block.
    • E、 Any statement that may throw an Runtime Exception must be enclosed in a try block.

    正确答案:B

  • 第2题:

    Which statement is true about the forwarding plane?()

    • A、The forwarding plane is the intelligence of the plattform
    • B、The forwarding plane is based on an x86 architecture
    • C、The forwarding plane maintains the routing tables, brdiging table, and primary forwarding table
    • D、The forwarding plane implements policers, stateless firwall filters, and class of service

    正确答案:D

  • 第3题:

    Which statement is true about The QoS Class Fibre Channel?()

    • A、 Cannot be disabled
    • B、 Cannot have the CoS changed
    • C、 Can have "Packet Drop" enabled
    • D、 Is multicast optimized
    • E、 Can have the MTU changed

    正确答案:A

  • 第4题:

    Given the following code fragment:     public void create() {     Vector myVect;     myVect = new Vector();      }  Which of the following statements are true?() 

    • A、 The declaration on line 2 does not allocate memory space for the variable myVect.
    • B、 The declaration on line 2 allocates memory space for a reference to a Vector object.
    • C、 The statement on line 2 creates an object of class Vector.
    • D、 The statement on line 3 creates an object of class Vector.
    • E、 The statement on line 3 allocates memory space for an object of class Vector.

    正确答案:A,D,E

  • 第5题:

    Which statement is true?()

    • A、 An anonymous inner class may be declared as final.
    • B、 An anonymous inner class can be declared as private.
    • C、 An anonymous inner class can implement multiple interfaces.
    • D、 An anonymous inner class can access final variables in any enclosing scope.
    • E、 Construction of an instance of a static inner class requires an instance of the enclosing outer class.

    正确答案:D

  • 第6题:

    Which statement is true?()

    • A、A class’s finalize() method CANNOT be invoked explicitly.
    • B、super.finalize() is called implicitly by any overriding finalize() method.
    • C、The finalize() method for a given object is called no more than once by the garbage collector.
    • D、The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.

    正确答案:C

  • 第7题:

    单选题
    Which the statement is true?()
    A

     The Error class is a Runtime Exception.

    B

     No exceptions are subclasses of Error.

    C

     Any statement that may throw an Error must be enclosed in a try block.

    D

     any statement that may throw an Exception must be enclosed in a try block.

    E

     Any statement that may throw an Runtime Exception must be enclosed in a try block.


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

  • 第8题:

    单选题
    Which statement about firefighting foam is TRUE?()
    A

    Foam conducts electricity

    B

    To be most effective,foam should be directed at the base of the fire

    C

    Foam is most effective on burning liquids which are flowing

    D

    Foam can ONLY be used to extinguish class A fires


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

  • 第9题:

    单选题
    Which statement is true for the class java.util.ArrayList?()
    A

     The elements in the collection are ordered.

    B

     The collection is guaranteed to be immutable.

    C

     The elements in the collection are guaranteed to be unique.

    D

     The elements in the collection are accessed using a unique key.

    E

     The elements in the collections are guaranteed to be synchronized.


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

  • 第10题:

    单选题
    package foo;  public class Outer {  public static class Inner {  }  }   Which statement is true?()
    A

     Compilation fails.

    B

     An instance of the Inner class can be constructed with “new Outer.Inner()”.

    C

     An instance of the Inner class cannot be constructed outside of package foo.

    D

     An instance of the Inner class can be constructed only from within the Outer class.

    E

     From within the package foo, and instance of the Inner class can be constructed with “new Inner()”.


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

  • 第11题:

    单选题
    Which statement is true?()
    A

     An anonymous inner class may be declared as final.

    B

     An anonymous inner class can be declared as private.

    C

     An anonymous inner class can implement multiple interfaces.

    D

     An anonymous inner class can access final variables in any enclosing scope.

    E

     Construction of an instance of a static inner class requires an instance of the enclosing outer class.


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

  • 第12题:

    单选题
    Which statement about static inner classes is true? ()
    A

     An anonymous class can be declared as static.

    B

     A static inner class cannot be a static member of the outer class.

    C

     A static inner class does not require an instance of the enclosing class.

    D

     Instance members of a static inner class can be referenced using the class name of the static inner class.


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

  • 第13题:

    Which statement about static inner classes is true?()

    • A、 An anonymous class can be declared as static.
    • B、 A static inner class cannot be a static member of the outer class.
    • C、 A static inner class does not require an instance of the enclosing class.
    • D、 Instance members of a static inner class can be referenced using the class name of the static inner class.

    正确答案:C

  • 第14题:

    package foo; public class Outer (  public static class Inner (  )  )   Which statement is true? () 

    • A、 An instance of the Inner class can be constructed with “new Outer.Inner ()”
    • B、 An instance of the inner class cannot be constructed outside of package foo.
    • C、 An instance of the inner class can only be constructed from within the outer class.
    • D、 From within the package bar, an instance of the inner class can be constructed with “new inner()”

    正确答案:A

  • 第15题:

    Which statement is true for the class java.util.ArrayList?()  

    • A、 The elements in the collection are ordered.
    • B、 The collection is guaranteed to be immutable.
    • C、 The elements in the collection are guaranteed to be unique.
    • D、 The elements in the collection are accessed using a unique key.
    • E、 The elements in the collections are guaranteed to be synchronized.

    正确答案:A

  • 第16题:

    public class Test{  public static void main( String[] argv ){  // insert statement here  }  }   Which statement, inserted at line 3, produces the following output?()  Exception in thread “main” java.lang.AssertionError: true at Test.main(Test.java:3)  

    • A、 assert true;
    • B、 assert false;
    • C、 assert false : true;
    • D、 assert false == true;
    • E、 assert false: false;

    正确答案:C

  • 第17题:

    Which statement is TRUE about the CacheFactory class ?()

    • A、 it is a topology agnostic way to access NamedCaches
    • B、 it provides mechanisms to manage underlying remote data sources
    • C、 both A and B are TRUE
    • D、Neither A nor B are TRUE

    正确答案:A

  • 第18题:

    单选题
    Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit?()
    A

    Compilation will succeed for all classes and interfaces.

    B

    Compilation of class C will fail because of an error in line 2.

    C

    Compilation of class C will fail because of an error in line 6.

    D

    Compilation of class AImpl will fail because of an error in line 2.


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

  • 第19题:

    单选题
    Given: Which statement is true?()
    A

     The cardID and limit variables break polymorphism.

    B

     The code demonstrates polymorphism.

    C

     The ownerName variable breaks encapsulation.

    D

     The setCardInformation method breaks encapsulation.

    E

     The class is fully encapsulated.


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

  • 第20题:

    单选题
    Which statement is TRUE about the CacheFactory class ?()
    A

     it is a topology agnostic way to access NamedCaches

    B

     it provides mechanisms to manage underlying remote data sources

    C

     both A and B are TRUE

    D

    Neither A nor B are TRUE


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

  • 第21题:

    单选题
    package foo; public class Outer (  public static class Inner (  )  )   Which statement is true? ()
    A

     An instance of the Inner class can be constructed with “new Outer.Inner ()”

    B

     An instance of the inner class cannot be constructed outside of package foo.

    C

     An instance of the inner class can only be constructed from within the outer class.

    D

     From within the package bar, an instance of the inner class can be constructed with “new inner()”


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

  • 第22题:

    单选题
    public class Test{  public static void main( String[] argv ){  // insert statement here  }  }   Which statement, inserted at line 3, produces the following output?()  Exception in thread “main” java.lang.AssertionError: true at Test.main(Test.java:3)
    A

     assert true;

    B

     assert false;

    C

     assert false : true;

    D

     assert false == true;

    E

     assert false: false;


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

  • 第23题:

    多选题
    Given the following code fragment:     public void create() {     Vector myVect;     myVect = new Vector();      }  Which of the following statements are true?()
    A

    The declaration on line 2 does not allocate memory space for the variable myVect.

    B

    The declaration on line 2 allocates memory space for a reference to a Vector object.

    C

    The statement on line 2 creates an object of class Vector.

    D

    The statement on line 3 creates an object of class Vector.

    E

    The statement on line 3 allocates memory space for an object of class Vector.


    正确答案: B,C
    解析: SL-275中指出:要为一个新对象分配空间必须执行new Xxx()调用,new调用执行以下的操作: 
    1.为新对象分配空间并将其成员初始化为0或者null。 
    2.执行类体中的初始化。(例如在类中有一个成员声明int a=10;在第一步后a=0 ,执行到第二步后a=10)    
    3.执行构造函数。 
    4.变量被分配为一个到内存堆中的新对象的引用。

  • 第24题:

    单选题
    Which statement is true about The QoS Class Fibre Channel?()
    A

     Cannot be disabled

    B

     Cannot have the CoS changed

    C

     Can have Packet Drop enabled

    D

     Is multicast optimized

    E

     Can have the MTU changed


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