多选题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 called no more than once by the garbage collector.EThe 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?()
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?() 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.

Click the Exhibit button. Given:Which statement is true if a TestException is thrown on line 3 of class B? () A.Line 33 must be called within a try block.B.The exception thrown by method1 in class A is not required to be caught.C.The method declared on line 31 must be declared to throw a RuntimeException.D.On line 5 of class A, the call to method2 of class B does not need to be placed in a try/catch block.

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.

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

Object类的finalize()方法是如何声明的()。A、public void finalize()B、protected int finalize()C、C.protected void finalize(intD、protected void finalize()throws Throwable

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.

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.

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.

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.

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.

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.

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.

单选题Under which circumstances will a thread stop?()AThe method waitforId() in class MediaTracker is called.BThe run() method that the thread is executing ends.CThe call to the start() method of the Thread object returns.DThe suspend() method is called on the Thread object.EThe wait() method is called on the Thread object.

多选题You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()AYour filter class must implement an init method and a destroy method.BYour filter class must also implement javax.servlet.FilterChain.CWhen your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.DThe method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.EYour filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.

多选题Which statements concerning the methods notify() and notifyAll() are true?AInstances of class Thread have a method called notify().BA call to the method notify() will wake the thread that currently owns the monitor of the object.CThe method notify() is synchronized.DThe method notifyAll() is defined in class Thread.EWhen 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.

单选题Which statement is true?()AA class’s finalize() method CANNOT be invoked explicitly.Bsuper.finalize() is called implicitly by any overriding finalize() method.CThe finalize() method for a given object is called no more than once by the garbage collector.DThe order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.

多选题Which two statements are true about the hashCode method?()AThe hashCode method for a given class can be used to test for object equality and object inequality for that class.BThe hashCode method is used by the java.util.SortedSet collection class to order theelements within that set.CThe hashCode method for a given class can be used to test for object inequality, but NOT object equality, for that class.DThe only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.EThe hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.

多选题Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?()AObjects are deleted when they can no longer be accessed through any reference.BThe finalize() method will eventually be called on every object.CThe finalize() method will never be called more than once on an object.DAn 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.EThe garbage collector will use a mark and sweep algorithm.

多选题Which two statements are true about the hashCode method?()AThe hashCode method for a given class can be used to test for object equality and object inequality for that class.BThe hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.CThe hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.DThe only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.EThe hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.

多选题Which two are true concerning the objects available to developers creating tag files?()AThe session object must be declared explicitly.BThe request and response objects are available implicitly.CThe output stream is available through the implicit outStream object.DThe servlet context is available through the implicit servletContext object.EThe JspContext for the tag file is available through the implicit jspContext object.

单选题Which methods from the String and StringBuffer classes modify the object on which they are called?()AThe charAt() method of the String class.BThe toUpperCase() method of the String class.CThe replace() method of the String class.DThe reverse() method of the StringBuffer class.EThe length() method of the StringBuffer class.

多选题Which three statements are true?()AA final method in class X can be abstract if and only if X is abstract.BA protected method in class X can be overridden by any subclass of X.CA private static method can be called only within other static methods in class X.DA non-static public final method in class X can be overridden in any subclass of X.EA public static method in class X can be called by a subclass of X without explicitly referencing the class X.FA method with the same signature as a private final method in class X can be implemented in a subclass of X.GA protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.

多选题Which two are true about the tag handler referneed by my Tag. ()AThe do Start Tag method is called once.BThe do After Body method is NOT called.CThe EVAL_Page constant is a valid return value for the do End Tag Method.Dthe EVAL_BODY_BUFFERED constant is a valid return value for the do Start Tag method.

多选题Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()AThe tag is invoked without a body.BThe doTAb method throws an exception.CThe  element has the value empty.DThe tag is called with the attribute skip-body=true

多选题Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()AThe doStartTag method is called once.BThe doAfterBody method is NOT called.CThe EVAL_PAGE constant is a valid return value for the doEndTag method.DThe SKIP_PAGE constant is a valid return value for the doStartTag method.EThe EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.

多选题Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()AIt can be invoked only from the doGet or doPost methods.BIt can be used independently of the getRemoteUser method.CCan return true even when its argument is NOT defined as a valid role name in the deployment descriptor.DUsing the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

多选题Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()AThe doStartTag method is called once.BThe doAfterBody method is NOT called.CThe EVAL_PAGE constant is a valid return value for the doEndTag method.DThe SKIP_PAGE constant is a valid return value for the doStartTag method.EThe EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.