Given:fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?A.foo.notify();B.bar.notify(

题目

Given:fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?

A.foo.notify();

B.bar.notify();

C.foo.notifyAll();

D.Thread.notify();

E.bar.notifyAll();


相似考题
更多“Given:fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisan ”相关问题
  • 第1题:

    He was() from his position as the president of the university.

    A、moved

    B、removed

    C、awarded

    D、given


    参考答案:B

  • 第2题:

    It has been held that the Shipowner will be liable for the loss of or damage to the goods even if this is due to excepted perils,unless he can prove that he has ______ proper care of them whilst they were in his custody.

    A.made

    B.taken

    C.gotten

    D.given


    正确答案:B

  • 第3题:

    ( ) more care, the flowers might have grown much better than now.

    A. Having given
    B. Giving
    C. To give
    D. Given

    答案:D
    解析:
    考查非谓语动词,主语是flowers,花与照料、打理逻辑上是被动关系,在选项中A、B是主动形式,C是不定式,只有D是被动的,故D选项正确。

  • 第4题:

    [A] set [B] exact [C] given [D] placed


    正确答案:A

  • 第5题:

    There was a very interesting remark in a book by an Englishman that I read recently( )what he thought was a reason for this American characteristic.

    A.giving
    B.gave
    C.to give
    D.given

    答案:A
    解析:
    该题考查非谓语动词。其中介词短语by an Englishman与定语从句that I read recently都做定语修饰book。可见空格处应填一分词做定语修饰remark,而what he thought...characteristic做分词的宾语,其中he thought为插入语。由此排除B,C选项.根据句意,remark与give应是主动关系,故排除选项D.答案为A。

  • 第6题:

    ___ more care, the flowers might have grown much better than now.

    A.Having given

    B.Giving

    C.To give

    D.Given

    答案:D
    解析:
    本题主要考查非谓语动词用法,题目意为“如果之前能多关心一些,这些花很可能会比现在长势好的多。”
      过去分词given+词,表示假设的情况,表示假设的情况,相当于一个条件句“If they had been given...”,非真实条件句,当从句的主语与主句的主语相同时,可以改为非谓语(现在分词或过去分词)的省略形式,但不能用完成时态。本句中主语是花,关怀是人给予花的,所以选择过去分词表示被动语态。