单项选择题
单项选择题 publicclassTwoThreads{privatestaticObjectresource=newObject();privatestaticvoiddelay(longn){try{Thread.sleep(n);}catch(Exceptione){System.out.print(”Error);}}publicstaticvoidmain(String[]args){System.out.print(”StartMain);newThread1().start();delay(1000);Threadt2=newThread2();t2.start();delay(1000);t2.interruptdelay(1000);System.out.print(”EndMain);}staticclassThread1extendsThread{publicvoidrun(){synchronized(resource){System.out.print(”Startl);delay(6000);System.out.print(”End1);}}}staticclassThread2extendsThread{publicvoidrun(){synchronized(resource){System.out.print(”Start2);delay(2000);System.out.print(”End2);}}}}Assumethatsleep(n)executesinexactlymmilliseconds,andallothercodeexecutesinaninsignificantamountoftime.Whatistheoutputifthemain()methodisrun?()
单项选择题 在C#中,基本的文件操作是由()命名空间提供的类来实现的。
单项选择题 关于编写货号的描述,以下哪个是正确的?()
单项选择题 AwebbrowserneedNOTalwaysperformacompleterequestforaparticularpagethatitsuspectsmightNOThavechanged.TheHTTPspecificationprovidesamechanismforthebrowsertoretrieveonlyapartialresponsefromthewebserver;thisresponseincludesinformation,suchastheLast-ModifieddatebutNOTthebodyofthepage.WhichHTTPmethodwillthebrowserusetoretrievesuchapartialresponse?()A.GETB.ASKC.SENDD.HEADE.TRACE
单项选择题 现有:1.classBook{2.privatefinalvoidread(){System.out.print("book");}3.}4.classPageextendsBook{5.publicstaticvoidmain(String[]args){6.//insertcodehere7.}8.privatefinalvoidread(){System.out.print("page");}9.}和如下三个代码片段(x,y,z):x.//justacommenty.newPage().read();z.newBook().read();分别插入到第6行,有几个允许代码通过编译并可以运行且无异常?()A.0B.1C.2D.3