网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
现有:t是一个合法的Thread对象的引用,并且t的合法run()方法如下:  public void run()  {  System.out.print ("go");      }      及:  t.start();      t.start();      t.run();      哪一个是结果?()
A

go go

B

go go go

C

go之后跟着一个异常

D

go go之后跟着一个异常


参考答案

参考解析
解析: 暂无解析
更多 “单选题现有:t是一个合法的Thread对象的引用,并且t的合法run()方法如下:  public void run()  {  System.out.print ("go");      }      及:  t.start();      t.start();      t.run();      哪一个是结果?()A go goB go go goC go之后跟着一个异常D go go之后跟着一个异常” 相关考题
考题 If it ( ) tomorrow, we ( ) to the Summer Palace. A、rains, will goB、won't rain, goC、doesn't rain, will go

考题 I want to go to the cinema, but you _____ with me.A. need not to goB. do not need goC. need not goD. need go not

考题 If it rains tomorrow, we _________ to picnic. A、wouldn't go toB、can't goC、won't go

考题 If it rains tomorrow, we()out for a picnic.A. wouldn't goB. can't goC. won't go

考题 classThread2implementsRunnable{voidrun(){System.out.print(go);}publicstaticvoidmain(String[]args){Thread2t2=newThread2();Threadt=newThread(t2);t.start();}}结果为:() A.goB.编译失败C.代码运行,无输出结果D.运行时异常被抛出

考题 I want to go to the dentist, but you ______ with me.A、need not to goB、do not need goC、need not goD、need go not

考题 t是一个合法的Thread对象的引用,并且t的合法run()方法如下:publicvoidrun(){System.out.print(go);}及:t.start();t.start();t.run();哪一个是结果?() A.goB.gogoC.gogogoD.go之后跟着一个异常

考题 现有:classThread2implementsRunnable{voidrun(){System.out.print(go);}publicstaticvoidmain(String[]args){Thread2t2=newThread2();Threadt=newThread(t2);t.start();}}结果为:() A.goB.编译失败C.代码运行,无输出结果D.运行时异常被抛出

考题 现有:t是一个合法的Thread对象的引用,并且t的合法run()方法如下:publicvoidrun(){System.out.print(go);}及:t.start();t.start();t.run();哪一个是结果?() A.gogoB.gogogoC.go之后跟着一个异常D.gogo之后跟着一个异常

考题 He didn‘t go to France,the doctor suggested that he_______there.( )A.won‘t go B.not go C.not to go D.didn’t go

考题 1. public class GoTest {  2. public static void main(String[] args) {  3. Sente a = new Sente(); a.go();  4. Goban b = new Goban(); b.go();  5. Stone c = new Stone(); c.go();  6. }  7. } 8.  9. class Sente implements Go {  10. public void go() { System.out.println(”go in Sente.”); }  11. }  12.  13. class Goban extends Sente {  14. public void go() { System.out.println(”go in Goban”); }  15. }  16.  17. class Stone extends Goban implements Go { }  18.  19. interface Go { public void go(); }  What is the result?() A、 go in Goban  go in Sente go in SenteB、 go in Sente  go in Sente go in GobanC、 go in Sente  go in Goban go in GobanD、 go in Goban go in Goban go in SenteE、 Compilation fails because of an error in line 17.

考题 现有:   class Thread2 implements Runnable {   void run() {   System.out.print("go ");   }   public static void main(String [] args) {   Thread2 t2 = new Thread2();   Thread t = new Thread(t2);   t.start();   }   }   结果为:()A、 goB、 编译失败C、 代码运行,无输出结果D、 运行时异常被抛出

考题 t 是一个合法的 Thread 对象的引用,并且 t 的合法 run() 方法如下:  public void run() {  System.out.print("go ");  }  及:   t.start();  t.start();  t.run();  哪一个是结果?() A、goB、go goC、go go goD、go 之后跟着一个异常

考题 1. class MyThread implements Runnable {  2. public void run() {  3. System.out.print("go ");  4. }  5.  6. public static void main(String [] args) {  7. // insert code here  8. t.start(); 9. }  10. }  和如下四句:  Thread t = new MyThread(); MyThread t = new MyThread();  Thread t = new Thread(new Thread());  Thread t = new Thread(new MyThread());  分别插入到第5行,有几个可以通过编译?() A、0B、1C、2D、3

考题 Which three will compile and run without exception?()A、private synchronized Object o;B、void go(){   synchronized(){/* code here */}C、public synchronized void go(){/* code here */}D、private synchronized(this) void go(){/* code here */}E、void go(){   synchronized(Object.class){/* code here */}F、void go(){   Object o = new Object();   synchronized(o){/* code here */}

考题 public class Threads4 {  public static void main (String[] args) {  new Threads4().go();  }  public void go() {  Runnable r = new Runnable() { public void run() {  System.out.print(”foo”);  }  };  Thread t = new Thread(r);  t.start();  t.start();  }  }  What is the result?() A、 Compilation fails.B、 An exception is thrown at runtime.C、 The code executes normally and prints „foo”.D、 The code executes normally, but nothing is printed.

考题 class Thread2 implements Runnable {  void run() {  System.out.print("go ");  }  public static void main(String [] args) {  Thread2 t2 = new Thread2();  Thread t = new Thread(t2);  t.start();  }  }   结果为()A、goB、编译失败C、代码运行,无输出结果D、运行时异常被抛出

考题 现有:t是一个合法的Thread对象的引用,并且t的合法run()方法如下:  public void run()  {  System.out.print ("go");      }      及:  t.start();      t.start();      t.run();      哪一个是结果?()    A、go goB、go go goC、go之后跟着一个异常D、go go之后跟着一个异常

考题 单选题现有:   class Thread2 implements Runnable {   void run() {   System.out.print("go ");   }   public static void main(String [] args) {   Thread2 t2 = new Thread2();   Thread t = new Thread(t2);   t.start();   }   }   结果为:()A  goB  编译失败C  代码运行,无输出结果D  运行时异常被抛出

考题 单选题class Thread2 implements Runnable {   void run() {    System.out.print("go ");    }   public static void main(String [] args) {   Thread2 t2 = new Thread2();   Thread t = new Thread(t2);   t.start();    }    }    结果为:()A  goB  编译失败C  代码运行,无输出结果D  运行时异常被抛出

考题 多选题Which three will compile and run without exception?()Aprivate synchronized Object o;Bvoid go() {synchronized() { /* code here */ }Cpublic synchronized void go() { /* code here */ }Dprivate synchronized(this) void go() { /* code here */ }Evoid go() {synchronized(Object.class) { /* code here */ }Fvoid go() {Object o = new Object();synchronized(o) { /* code here */ }

考题 单选题t 是一个合法的 Thread 对象的引用,并且 t 的合法 run() 方法如下:  public void run() {  System.out.print("go ");  }  及:   t.start();  t.start();  t.run();  哪一个是结果?()A goB go goC go go goD go 之后跟着一个异常

考题 单选题public class Threads4 {  public static void main (String[] args) {  new Threads4().go();  }  public void go() {  Runnable r = new Runnable() { public void run() {  System.out.print(”foo”);  }  };  Thread t = new Thread(r);  t.start();  t.start();  }  }  What is the result?()A  Compilation fails.B  An exception is thrown at runtime.C  The code executes normally and prints „foo”.D  The code executes normally, but nothing is printed.

考题 单选题1. class MyThread implements Runnable {  2. public void run() {  3. System.out.print("go ");  4. }  5.  6. public static void main(String [] args) {  7. // insert code here  8. t.start(); 9. }  10. }  和如下四句:  Thread t = new MyThread(); MyThread t = new MyThread();  Thread t = new Thread(new Thread());  Thread t = new Thread(new MyThread());  分别插入到第5行,有几个可以通过编译?()A 0B 1C 2D 3

考题 单选题class Thread2 implements Runnable {  void run() {  System.out.print("go ");  }  public static void main(String [] args) {  Thread2 t2 = new Thread2();  Thread t = new Thread(t2);  t.start();  }  }   结果为()A goB 编译失败C 代码运行,无输出结果D 运行时异常被抛出

考题 单选题现有:  class Thread2 implements Runnable  {      void run()  {      System.out.print ("go¨);      }      public static void main(String  []  args)  {        Thread2 t2=new Thread2();      Thread t=new Thread(t2);      t.start();      }      }      结果为:()A goB 运行时异常被抛出C 代码运行,无输出结果D 编译失败

考题 单选题1. public class GoTest {  2. public static void main(String[] args) {  3. Sente a = new Sente(); a.go();  4. Goban b = new Goban(); b.go();  5. Stone c = new Stone(); c.go();  6. }  7. } 8.  9. class Sente implements Go {  10. public void go() { System.out.println(”go in Sente.”); }  11. }  12.  13. class Goban extends Sente {  14. public void go() { System.out.println(”go in Goban”); }  15. }  16.  17. class Stone extends Goban implements Go { }  18.  19. interface Go { public void go(); }  What is the result?()A  go in Goban  go in Sente go in SenteB  go in Sente  go in Sente go in GobanC  go in Sente  go in Goban go in GobanD  go in Goban go in Goban go in SenteE  Compilation fails because of an error in line 17.