“弟子不必不如师,师不必贤于弟子,闻道有先后,术业有专攻,如是而已”。这种观点对当今教育的启示是师生之间应_____。
查看答案
现有:
5.classOrder2implementsRunnable{
6.publicvoidrun(){
7. for(intx-o;x<4;x++){
8. try{Thread.sleep(100);)catch(Exceptione){}
9.System.out.print("r");
10.}}
11.publicstaticvoidmain(string[]args){
12.Threadt=newThread(neworder2());
13.t.start();
14.for(intx=0;x<4;x++){
15.//insertcodehere
16.System.out.print("m");
17.}}}
哪一个插入到第15行,最有可能产生输出rmrmrmrm?()
现有:
classWaitingimplementsRunnable{
booleanflag=false;
publicsynchronizedvoidrun(){
if(flag){
flag=false;
System.out.print("1");
try{this.wait();)catch(Exceptione){}
System.out.print("2");
}
else{
flag=true;
System.out.print("3");
try{Thread.sleep(2000);}catch(Exceptione){}
System.out.print("4");
notify();
}
}
publicstaticvoidmain(String[]args){
Waitingw=newWaiting();
newThread(w).start();
newThread(w).start();
}
}
以下哪两项是正确的?()