单选题Which method must be defined by a class implementing the java.lang.Runnable interface? ()Avoid run()Bpublic void run()Cpublic void start()Dvoid run(int priority)Epublic void run(int priority)Fpublic void start(int priority)

题目
单选题
Which method must be defined by a class implementing the java.lang.Runnable interface? ()
A

 void run()

B

 public void run()

C

 public void start()

D

 void run(int priority)

E

 public void run(int priority)

F

 public void start(int priority)


相似考题
更多“Which method must be defined by a class implementing the jav”相关问题
  • 第1题:

    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

  • 第2题:

    Which method must be defined by a class implementing the java.lang.Runnable interface? () 

    • A、 void run()
    • B、 public void run()
    • C、 public void start()
    • D、 void run(int priority)
    • E、 public void run(int priority)
    • F、 public void start(int priority)

    正确答案:B

  • 第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题:

    Given an EL function declared with:11.  12.spin 13.com.example.Spinner 14. 15.java.lang.String spinIt() 16. 17. Which two are true?()

    • A、The function method must have the signature: public String spin().
    • B、The method must be mapped to the logical name "spin" in the web.xml file.
    • C、The function method must have the signature: public String spinIt().
    • D、The function method must have the signature public static String spin().
    • E、The function method must have the signature: public static String spinIt().
    • F、The function class must be named Spinner, and must be in the package com.example.

    正确答案:E,F

  • 第5题:

    You are developing a custom-collection class.You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet?()

    • A、The method must return a type of either IEnumerator or IEnumerable.
    • B、The method must return a type of IComparable.
    • C、The method must explicitly contain a collection.
    • D、The method must be the only iterator in the class.

    正确答案:A

  • 第6题:

    单选题
    Which method must be defined by a class implementing the java.lang.Runnable interface? ()
    A

     void run()

    B

     public void run()

    C

     public void start()

    D

     void run(int priority)

    E

     public void run(int priority)

    F

     public void start(int priority)


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

  • 第7题:

    多选题
    Which of the following statements about variables and scope are true?()
    A

    Local variables defined inside a method are destroyed when the method is exited.

    B

    Local variables are also called automatic variables.

    C

    Variables defined outside a method are created when the object is constructed.

    D

    A method parameter variable continues to exist for as long as the object is needed in which the method is defined.


    正确答案: C,A
    解析: 本题是讨论变量的类型及作用域。

  • 第8题:

    多选题
    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.


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

  • 第9题:

    多选题
    Which of the following statements about variables and their scopes are true? ()
    A

    Instance variables are member variables of a class.

    B

    Instance variables are declared with the static keyword.

    C

    Local variables defined inside a method are created when the method is executed.

    D

    Local variables must be initialized before they are used.


    正确答案: B,D
    解析: 类中有几种变量,分别是:局部变量(英文可以为:local/automatic/temporary/stack variable)是定义在方法里的变量;实例变量(英文为:instance variable)是在方法外而在类声明内定义的变量,有时也叫成员变量;类变量(英文为:class variable)是用关键字static声明的实例变量,他们的生存期分别是:局部变量在定义该变量的方法被调用时被创建,而在该方法退出后被撤销;实例变量在使用new Xxxx()创建该类的实例时被创建,而其生存期和该类的实例对象的生存期相同;类变量在该类被加载时被创建,不一定要用new Xxxx()创建,所有该类的实例对象共享该类变量,其生存期是类的生存期。任何变量在使用前都必须初始化,但是需要指出的是局部变量必须显式初始化,而实例变量不必,原始类型的实例变量在该类的构造方法被调用时为它分配的缺省的值,整型是0,布尔型是false,而浮点型是0.0f,引用类型(类类型)的实例变量的缺省值是null(没有进行实际的初始化,对它的使用将引起NullPointException),类变量的规则和实例变量一样,不同的是类变量的初始化是在类被加载时。

  • 第10题:

    单选题
    You are modifying an existing Windows Communication Foundation (WCF) service that is defined as follows:[ServiceContract]public interface IMessageProcessor { [OperationContract] void ProcessMessages( );}public class MessageProcessor: IMessageProcessor { public void ProcessMessage( ); SubmitOrder( );}SubmitOrder makes a call to another service. The ProcessMessage method does not perform as expected under a heavy load.You need to enable processing of multiple messages. New messages must only be processed when the ProcessMessage method is not processing requests,or when it is waiting for calls to SubmitOrder to return.Which attribute should you apply to the MessageProcessor class?()
    A

    CallbackBehavior(ConcurrencyMode=ConcurencyMode.Reentrant)

    B

    CallbackBehavior(ConcurrencyMode=ConcurrencyMode.Multiple)

    C

    ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Reentrant)

    D

    ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple)


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

  • 第11题:

    多选题
    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.


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

  • 第12题:

    多选题
    Given an EL function declared with:11.  12.spin 13.com.example.Spinner 14. 15.java.lang.String spinIt() 16. 17. Which two are true?()
    A

    The function method must have the signature: public String spin().

    B

    The method must be mapped to the logical name spin in the web.xml file.

    C

    The function method must have the signature: public String spinIt().

    D

    The function method must have the signature public static String spin().

    E

    The function method must have the signature: public static String spinIt().

    F

    The function class must be named Spinner, and must be in the package com.example.


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

  • 第13题:

    What is a limitation of implementing uRPF?()

    • A、MPLS LDP must be enabled.
    • B、BGP routing protocol must be running.
    • C、Named access-lists must be configured.
    • D、Symmetrical routing is required.
    • E、Domain name must be defined

    正确答案:D

  • 第14题:

    It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?()  

    • A、Mark the method with the keyword public.
    • B、Mark the method with the keyword protected.
    • C、Mark the method with the keyword private.
    • D、Mark the method with the keyword package.
    • E、Do not mark the method with any accessibility modifiers.

    正确答案:E

  • 第15题:

    A developer wants too use EL to invoke a function using S{my:bloof(“foof”)}. Which is always true?()

    • A、 The method invoked by this function must be statie.
    • B、 The function class must implement the Function interface.
    • C、 The expression is NOT a valid EL expression for invoking a function.
    • D、 The function must be declared in a web.xml file using the  element.
    • E、 The function class must have a method with the signature:Void bloof (java.lang.Strings)

    正确答案:A

  • 第16题:

    You are implementing an ASP. NET MVC 2 Web application. You add a controller named Company Controller. You need to modify the application to handle the URL path /company/info. Which two actions should you perform?()

    • A、Add the following method to the CompanyController class. Function Info() As ActionResult   Return View() End Function
    • B、Add the following method to the CompanyController class. Function Company_Info() As ActionResult  Return View() End Function
    • C、Right-click the Views folder, and select View from the Add submenu to create the view for the action.
    • D、Right-click inside the action method in the CompanyController class, and select Add View to create a view for the action

    正确答案:A,D

  • 第17题:

    单选题
    A developer wants too use EL to invoke a function using S{my:bloof(“foof”)}. Which is always true?()
    A

     The method invoked by this function must be statie.

    B

     The function class must implement the Function interface.

    C

     The expression is NOT a valid EL expression for invoking a function.

    D

     The function must be declared in a web.xml file using the  element.

    E

     The function class must have a method with the signature:Void bloof (java.lang.Strings)


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

  • 第18题:

    单选题
    It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?()
    A

    Mark the method with the keyword public.

    B

    Mark the method with the keyword protected.

    C

    Mark the method with the keyword private.

    D

    Mark the method with the keyword package.

    E

    Do not mark the method with any accessibility modifiers.


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

  • 第19题:

    单选题
    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.


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

  • 第20题:

    多选题
    A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed.  Which two are true? ()
    A

    A  element in the echo tag LTD must have the value JSP

    B

    The echo tag handler must define the setAttribute (String key, String value) method

    C

    The true element must appear in the echo tag TLD

    D

    The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface

    E

    The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface


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

  • 第21题:

    单选题
    1. public class a {  2. public void method1() {  3. try {  4. B b=new b();  5. b.method2();  6. // more code here  7. } catch (TestException te) {  8. throw new RuntimeException(te);  9. }  10. }  11. }  1. public class b {  2. public void method2() throws TestException {  3. // more code here  4. }  5. }  1. public class TestException extends Exception {  2. }  Given:  31. public void method() {  32. A a=new a();  33. a.method1();  34. }  Which 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.


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

  • 第22题:

    单选题
    You are developing a custom-collection class.You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet?()
    A

    The method must return a type of either IEnumerator or IEnumerable.

    B

    The method must return a type of IComparable.

    C

    The method must explicitly contain a collection.

    D

    The method must be the only iterator in the class.


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

  • 第23题:

    单选题
    What is a limitation of implementing uRPF?()
    A

    MPLS LDP must be enabled.

    B

    BGP routing protocol must be running.

    C

    Named access-lists must be configured.

    D

    Symmetrical routing is required.

    E

    Domain name must be defined


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

  • 第24题:

    多选题
    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.


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