欢迎来到在线考试题库网 在线考试题库官网
logo
全部科目 > 计算机考试试题及答案解析

单项选择题

Given:fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?
A.foo.notify();
B.bar.notify();
C.foo.notifyAll();
D.Thread.notify();
E.bar.notifyAll();

    A.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?
    A.foo.notify();
    B.bar.notify();
    C.foo.notifyAll();
    D.Thread.notify();
    E.bar.notifyAll();
点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题