易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

Runnable r = new Runnable() {  public void run() {  System.out.print(”Cat”);  }  };  Threadt=new Thread(r) {  public void run() {  System.out.print(”Dog”);  }  };  t.start();  What is the result?() 

A、 Cat

B、 Dog

C、 Compilation fails.

D、 The code runs with no output.

E、 An exception is thrown at runtime.

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  • What can directly access and change the value of the variable name?()

    A、 any class

    B、 only the Target class

    C、 any class in the test package

    D、 any class that extends Target

  • What will be the appearance of an applet with the following init() method?   public void init() {   add(new Button("hello"));  }  

    A、Nothing appears in the applet.

    B、A button will cover the whole area of the applet.

    C、A button will appear in the top left corner of the applet.

    D、A button will appear, centered in the top region of the applet.

    E、A button will appear in the center of the applet.

  • 10. public class MyClass {  11.  12. public Integer startingI;  13. public void methodA() {  14. Integer i = new Integer(25);  15. startingI = i;  16. methodB(i);  17. }  18. private void methodB(Integer i2) {  19. i2 = i2.intValue();  20.  21. }  22. }  If methodA is invoked, which two are true at line 20?()

    A

     i2 == startingI returns true.

    B

     i2 == startingI returns false.

    C

     i2.equals(startingI) returns true.

    D

     i2.equals(startingI) returns false.

  • Given classes defined in two different files: What is the result of executing XMLMessage.main?()

    A、 text

    B、 Compilation fails.

    C、 text

    D、 An exception is thrown at runtime.

  • Which two statements are true regarding the return values of property written hashCode and equals methods from two instances of the same class?()

    A

     If the hashCode values are different, the objects might be equal.

    B

     If the hashCode values are the same, the object must be equal.

    C

     If the hashCode values are the same, the objects might be equal.

    D

     If the hashCode values are different, the objects must be unequal.

联系客服 会员中心
TOP