网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
现有:classPencil{publicvoidwrite(Stringcontent){System.out.println("Write"+content);}}classRubberPencilextendsPencil{publicvoidwrite(Stringcontent){System.out.println("RubberWrite"+content);}publicvoiderase(Stringcontent){System.out.println("Erase"+content);}}执行下列代码的结果是哪项?()Pencilpen=newRubberPencil();pen.write("Hello");
A.WriteHello
B.RubberWriteHello
C.编译错误
D.运行时抛出异常
参考答案
更多 “ 现有:classPencil{publicvoidwrite(Stringcontent){System.out.println(Write+content);}}classRubberPencilextendsPencil{publicvoidwrite(Stringcontent){System.out.println(RubberWrite+content);}publicvoiderase(Stringcontent){System.out.println(Erase+content);}}执行下列代码的结果是哪项?()Pencilpen=newRubberPencil();pen.write(Hello);A.WriteHelloB.RubberWriteHelloC.编译错误D.运行时抛出异常 ” 相关考题
考题
Mr.Smithsays:quot;Themediaareverygoodatsensingamoodandthenit.quot;A)exaggeratingB)overtakingC)wideningD)enlarging
考题
在PowerPoint 2003中,删除幻灯片的操作可以是()。A.单击常用工具栏中的quot粘贴quot按钮B.选择quot编辑quot菜单中的quot删除幻灯片quot选项C.选择quot编辑quot菜单中的quot清除quot选项D.单击常用工具栏中的quot复制quot按钮
考题
在PowerPoint 2003启动幻灯片放映的操作中,错误的是()。A.单击演示文稿窗口左下角的quot幻灯片放映quot视图按钮B.选择quot幻灯片放映quot菜单中的quot观看放映quot命令C.选择quot幻灯片放映quot菜单中的quot幻灯片放映quot命令D.按F5键
考题
在PowerPoint中,若想给“文本框”对象或“文本框占位符”设置动画效果,下列说法正确是()。A.执行quot格式quot菜单的quot幻灯片设计quot命令,右侧有一个相应的设置窗格B.执行quot幻灯片反映quot菜单的quot自定义动画quot命令,右侧有一个相应的设置窗格C.执行quot格式quot菜单的quot幻灯片版式quot命令,右侧有一个相应的设置窗格D.以上说法全错
考题
现有:classPencil{publicvoidwrite(Stringcontent){System.out.println(Write,+content){}}classRubberPencilextendsPencil{publicvoidwrite(Stringcontent){System.out.println(RubberWrite+content);}publicvoiderase(Stringcontent)}}执行下列代码的结果是哪项?()Pencilpen=newPencil();((RubberPencil)pen).write(Hello);A.WriteHelloB.RubberWriteHelloC.编译失败D.运行时抛出异常
考题
Whichmethodimplementationswillwritethegivenstringtoafilenamedfile,usingUTF8encoding?()IMPLEMENTATIONa:publicvoidwrite(Stringmsg)throwsIOException{FileWriterfw=newFileWriter(newFile(file));fw.write(msg);fw.close();}IMPLEMENTATIONb:publicvoidwrite(Stringmsg)throwsIOException{OutputStreamWriterosw=newOutputStreamWriter(newFileOutputStream(file),UTF8);osw.write(msg);osw.close();}IMPLEMENTATIONc:publicvoidwrite(Stringmsg)throwsIOException{FileWriterfw=newFileWriter(newFile(file));fw.setEncoding(UTF8);fw.write(msg);fw.close();}IMPLEMENTATIONd:publicvoidwrite(Stringmsg)throwsIOException{FilterWriterfw=FilterWriter(newFileWriter(file),UTF8);fw.write(msg);fw.close();}IMPLEMENTATIONe:publicvoidwrite(Stringmsg)throwsIOException{OutputStreamWriterosw=newOutputStreamWriter(newOutputStream(newFile(file)),UTF8);osw.write(msg);osw.close();}
考题
OutputStreamWriter类包含的方法主要有( )。A.public OutputStreamWriter(OutputStream out)B.public voidwrite(intc)throws IOExceptionC.public voidwrite(String str)throws IOExceptionD.public flush throws IOException
热门标签
最新试卷