Section B
Directions: In this section, you will hear 3 short passages. At the end of each passage, you will hear some questions. Both the passage and the questions will be spoken only once. After you hear a question, you must choose the best answer from the four choices marked A, B, C and D.
(31)
A.Because he didn't understand French.
B.Because he didn't believe what William said.
C.Because he couldn't understand a word of English.
D.Because he hated English-speaking people.
第1题
在多线程并发程序设计中,能够给对象x加锁的语句是()。
A.x.wait()
B.synchronized(x)
C.x.notify()
D.x.synchronized()
第2题
在多线程并发程序设计中,能够给对象x加锁的语句是()。
A.X.wait
B.synchronized(x)
C.X.notify
D.x.synchronized
第5题
(32 )在多线程并发程序设计中,能够给对象 x 加锁的语句是
A ) x.wait()
B ) synchronized(x)
C ) x.notify()
D ) x.synchronized()
第7题
A.使用同步语句可以指定对哪个对象加锁
B.同步语句“synchronized(this ) { …… }”表示对当前对象加锁
C.同步语句只能锁定当前对象
D.同步语句可实现更细粒度的并发控制
第8题
在以下哪种情况下,对象不会解锁?()
A.synchronized段语句块执行完毕
B.synchronized语句块中出现exception
C.持锁线程调用对象wait () 方法
D.synchronized语句块中调用suspend () 方法
第10题
从键盘的输入中,读入一个值并赋值给x的语句是 ______ 。
A.cin>>x
B.cin<<x
C.cout>>x
D.cout<<x
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!