niusouti.com

多选题Which two are true?()AA finalizer may NOT be invoked explicitly.BThe finalize method declared in class Object takes no action.Csuper.finalize()is called implicitly by any over riding finalize method.DThe finalize method for a given objec twill be calle

题目
多选题
Which two are true?()
A

A finalizer may NOT be invoked explicitly.

B

The finalize method declared in class Object takes no action.

C

super.finalize()is called implicitly by any over riding finalize method.

D

The finalize method for a given objec twill be called no more than once by the garbage collector.

E

The order in which finalize will be called on two objects is based on the order in which the two objects became finalizable.


相似考题
更多“多选题Which two are true?()AA finalizer may NOT be invoked explicitly.BThe finalize method declared in class Object takes no action.Csuper.finalize()is called implicitly by any over riding finalize method.DThe finalize method for a given objec twill be calle”相关问题
  • 第1题:

    Object类的finalize()方法是如何声明的()。

    • A、public void finalize()
    • B、protected int finalize()
    • C、C.protected void finalize(int
    • D、protected void finalize()throws Throwable

    正确答案:D

  • 第2题:

    Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?()  

    • A、Objects are deleted when they can no longer be accessed through any reference.
    • B、The finalize() method will eventually be called on every object.
    • C、The finalize() method will never be called more than once on an object.
    • D、An object will not be garbage collected as long as it is possible for an active part of the program to      access it through a reference.
    • E、The garbage collector will use a mark and sweep algorithm.

    正确答案:C,D

  • 第3题:

    Which methods from the String and StringBuffer classes modify the object on which they are called?()  

    • A、The charAt() method of the String class.
    • B、The toUpperCase() method of the String class.
    • C、The replace() method of the String class.
    • D、The reverse() method of the StringBuffer class.
    • E、The length() method of the StringBuffer class.

    正确答案:D

  • 第4题:

    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

  • 第5题:

    单选题
    Under which circumstances will a thread stop?()
    A

    The method waitforId() in class MediaTracker is called.

    B

    The run() method that the thread is executing ends.

    C

    The call to the start() method of the Thread object returns.

    D

    The suspend() method is called on the Thread object.

    E

    The wait() method is called on the Thread object.


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

  • 第6题:

    多选题
    Which two are true?()
    A

    A finalizer may NOT be invoked explicitly.

    B

    The finalize method declared in class Object takes no action.

    C

    super.finalize()is called implicitly by any over riding finalize method.

    D

    The finalize method for a given objec twill be called no more than once by the garbage collector.

    E

    The order in which finalize will be called on two objects is based on the order in which the two objects became finalizable.


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

  • 第7题:

    单选题
    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
    解析: 暂无解析

  • 第8题:

    多选题
    Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?()
    A

    Objects are deleted when they can no longer be accessed through any reference.

    B

    The finalize() method will eventually be called on every object.

    C

    The finalize() method will never be called more than once on an object.

    D

    An object will not be garbage collected as long as it is possible for an active part of the program to      access it through a reference.

    E

    The garbage collector will use a mark and sweep algorithm.


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

  • 第9题:

    多选题
    Which two are true concerning the objects available to developers creating tag files?()
    A

    The session object must be declared explicitly.

    B

    The request and response objects are available implicitly.

    C

    The output stream is available through the implicit outStream object.

    D

    The servlet context is available through the implicit servletContext object.

    E

    The JspContext for the tag file is available through the implicit jspContext object.


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

  • 第10题:

    多选题
    Which three statements are true?()
    A

    A final method in class X can be abstract if and only if X is abstract.

    B

    A protected method in class X can be overridden by any subclass of X.

    C

    A private static method can be called only within other static methods in class X.

    D

    A non-static public final method in class X can be overridden in any subclass of X.

    E

    A public static method in class X can be called by a subclass of X without explicitly referencing the class X.

    F

    A method with the same signature as a private final method in class X can be implemented in a subclass of X.

    G

    A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.


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

  • 第11题:

    多选题
    Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()
    A

    The tag is invoked without a body.

    B

    The doTAb method throws an exception.

    C

    The  element has the value empty.

    D

    The tag is called with the attribute skip-body=true


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

  • 第12题:

    多选题
    Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()
    A

    It can be invoked only from the doGet or doPost methods.

    B

    It can be used independently of the getRemoteUser method.

    C

    Can return true even when its argument is NOT defined as a valid role name in the deployment descriptor.

    D

    Using the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.


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

  • 第13题:

    Which statements concerning the methods notify() and notifyAll() are true?  

    • A、Instances of class Thread have a method called notify().
    • B、A call to the method notify() will wake the thread that currently owns the monitor of the object.
    • C、The method notify() is synchronized.
    • D、The method notifyAll() is defined in class Thread.
    • E、When there is more than one thread waiting to obtain the monitor of an object, there is no way to be     sure which thread will be notified by the notify() method.

    正确答案:A,E

  • 第14题:

    Under which circumstances will a thread stop?()  

    • A、The method waitforId() in class MediaTracker is called.
    • B、The run() method that the thread is executing ends.
    • C、The call to the start() method of the Thread object returns.
    • D、The suspend() method is called on the Thread object.
    • E、The wait() method is called on the Thread object.

    正确答案:B

  • 第15题:

    Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()

    • A、It can be invoked only from the doGet or doPost methods.
    • B、It can be used independently of the getRemoteUser method.
    • C、Can return "true" even when its argument is NOT defined as a valid role name in the deployment descriptor.
    • D、Using the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

    正确答案:B,C

  • 第16题:

    Which two statements are true about the hashCode method?()

    • A、The hashCode method for a given class can be used to test for object equality and object inequality for that class.
    • B、The hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.
    • C、The hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.
    • D、The only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.
    • E、The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.

    正确答案:C,E

  • 第17题:

    多选题
    You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()
    A

    Your filter class must implement an init method and a destroy method.

    B

    Your filter class must also implement javax.servlet.FilterChain.

    C

    When your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.

    D

    The method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.

    E

    Your filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.


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

  • 第18题:

    多选题
    Which statements concerning the methods notify() and notifyAll() are true?
    A

    Instances of class Thread have a method called notify().

    B

    A call to the method notify() will wake the thread that currently owns the monitor of the object.

    C

    The method notify() is synchronized.

    D

    The method notifyAll() is defined in class Thread.

    E

    When there is more than one thread waiting to obtain the monitor of an object, there is no way to be     sure which thread will be notified by the notify() method.


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

  • 第19题:

    多选题
    Which two statements are true about the hashCode method?()
    A

    The hashCode method for a given class can be used to test for object equality and object inequality for that class.

    B

    The hashCode method is used by the java.util.SortedSet collection class to order theelements within that set.

    C

    The hashCode method for a given class can be used to test for object inequality, but NOT object equality, for that class.

    D

    The only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.

    E

    The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.


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

  • 第20题:

    多选题
    Which two statements are true about the hashCode method?()
    A

    The hashCode method for a given class can be used to test for object equality and object inequality for that class.

    B

    The hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.

    C

    The hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.

    D

    The only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.

    E

    The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.


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

  • 第21题:

    单选题
    Which methods from the String and StringBuffer classes modify the object on which they are called?()
    A

    The charAt() method of the String class.

    B

    The toUpperCase() method of the String class.

    C

    The replace() method of the String class.

    D

    The reverse() method of the StringBuffer class.

    E

    The length() method of the StringBuffer class.


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

  • 第22题:

    多选题
    Which two are true about the tag handler referneed by my Tag. ()
    A

    The do Start Tag method is called once.

    B

    The do After Body method is NOT called.

    C

    The EVAL_Page constant is a valid return value for the do End Tag Method.

    D

    the EVAL_BODY_BUFFERED constant is a valid return value for the do Start Tag method.


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

  • 第23题:

    多选题
    Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()
    A

    The doStartTag method is called once.

    B

    The doAfterBody method is NOT called.

    C

    The EVAL_PAGE constant is a valid return value for the doEndTag method.

    D

    The SKIP_PAGE constant is a valid return value for the doStartTag method.

    E

    The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.


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

  • 第24题:

    多选题
    Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()
    A

    The doStartTag method is called once.

    B

    The doAfterBody method is NOT called.

    C

    The EVAL_PAGE constant is a valid return value for the doEndTag method.

    D

    The SKIP_PAGE constant is a valid return value for the doStartTag method.

    E

    The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.


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