My brother got his first job at__________age of 30.
A.an
B.the
C./
A.an
B.the
C./
A.And
B.Beside
C.Together with
D.Except
阅读以下说明和Java代码,将应填入(n)处的字句写在对应栏内。
【说明】
下面的Java程序演示了程序竞争资源(Mutex的实例对象)而引起程序死锁的一种例子。
【Java程序】
import java.applet.*;
import java.awt.*;
//此处声明一个互斥类
class Mutex { }
class A extends (1)
{
private Mutex first,second;
public A(Mutex f,Mutex s)
{
first = f;
second = s;
}
public void run()
{
//锁定first变量
(2) (first)
{
try
{ //本线程挂起,等待重新调度
Thread.sleep(1); //注意此处(1)不是小题序号
}
catch(InterruptedException e){}
System. out. println("threadA got first mutex");
(2) (second) //锁定second变量
{ //do something
System. out. println("threadA got second mutex");
} //释放second变量
} //释放first变量
}
}
class B extends (1)
{
private Mutex first,second;
public B(Mutex f,Mutex s)
{
(3) ;
second = s;
}
public void run()
{
(2) (second) //锁定second变量
{
//do something
try
{
Thread.sleep(((int)(3*Math.random()))*1000);
//本线程挂起,等待重新调度
}
catch(InterruptedException e){}
System.out.println("threadB got second mutex");
(2) (first) //锁定first变量
{
//do something
System.out.println("threadB got first mutex");
} //释放first变量
} //释放second变量
}
}
public class DeadlockExample
{
public static void main(String arg[])
{
Mutex mutexX = new Mutex();
Mutex mutexY = new Mutex();
AthreadA = new A(mutexX,mutexY);
B threadB = new B (4);
threadA.(5);
threadB.start();
}
}
A: Hey, Lily, what are you doing? L: ___________ for someone. A: You mean the boy you met on WeChat? L: You’re right. He is so ___________ and I think I fall in love with him. A: You must be joking. You can’t fall in love with someone you’ve never met! L: I know, but I keep thinking of him every day. And I get really depressed (沮丧的) when he’s not online. A: I think you just have a crush on him. You can’t be serious. L: Well, this might be silly. But I just can’t get him off my ___________. And I can’t help missing him. A: Did you tell him? L: Yes. He said I’m his dream girl. A: You shouldn’t take it too seriously. It might be a _______. L: I know. I can’t tell whether he’s serious or not so I need your ___________. A: I think you should enlarge your circle of real-life friends, and then the right person will come along.
A.has begun
B.had begun
C.has been on
D.had been on
We got your name from the UI Ltd of Belgium()a reference.
A.for
B.as
C.be
D.with
A.marrying
B.marriage
C.married
D.to marry
A.As
B.Since
C.When
D.If