Hello, I’m Harry Potter. Hello, my name is Charles Green, but().
第1题:
A. Hello, Sue
B. I'm terribly busy these days
C. Mind your own business
D. See you later
第2题:
下面程序创建了一个线程并运行,请填空,使程序完整。
public class ThreadTest {
public static void main (String[] args) {
Hello h=Hew Hello ();
【 】
t.start ();
}
}
class Hello implements Runnable {
int i;
public void run () {
while(true) {
System.out.println("Hello" +i++);
if(i==5) break;
}
}
}
第3题:
A.Nothing much
B.Fine, thanks.How about you?
C.I’m pleased to meet you
D.I’m fine, thanks
第4题:
A、Nice to meet you.
B、I'm a secretary.
C、Daniel Anderson.
第5题:
请阅读下面程序 public class ThreadTest { public static void main(String args[]) throws Exception{ int i=0; Hello t=new Hello(); while(true) { System.out.println("Good Moming"+i++); if (i==2 && t.isAlive()) { System. out.println("Main waiting for Hello!"); t.join(); //等待t运行结束 } if(i==5) break;} } } class Hello extends Thread { int i; public void run() { while(true){ System.out.println("Hello"+i++); if (i==5) break;}}} 为使该程序正确执行,下划线处的语句应是
A.t.sleep()
B.t.yield()
C.t.interrupt()
D.t.start()
第6题:
l.—Hello! My name_________ Tom.
—Hello! I _________ Kate.
A. is ; is
B. am ; am
C. am; is
D. is ; am
第7题:
( 28 )请阅读下面程序
public class ThreadTest {
public static void main ( String args[ ]) throws Exception {
int i=0;
Hello t = new Hello ();
___________;
whlle ( true ){
System.out.println ( "Good Morning"+i++ ) ;
if ( i=2 && t.isAlive ()){
System.out.println ( "Main waiting for Hello ! ” );
tjoin () ; // 等待 t 运行结束
}
if ( i==5 ) break :}
}
}
class Hello extends Thread {
int i ;
public void run ()笼
while ( true ){
System.out.println ( "Hello"+i++ ) ;
if ( i=5 ) break ;}}}
为使该程序正确执行,下划线处的语句应是
A ) t.sleep ()
B ) t.yieldn ()
C ) t.interrupt ()
D ) t.start ()
第8题:
A、Yes.
B、Thank you.
C、Hello.
D、I’m Nancy Brook.
第9题:
-- Hello, Xiaoyan. How Was the party?
--- ____
A. I’m fine, thank you
B. It was Friday
C. Hi, Jack. We had a great time
第10题:
A: Hello, I'm David. Nice to meet you. B: Nice to meet you, too. I'm Lee.()