【计算机类职业资格】二级JAVA机试-209及答案解析.doc

上传人:fuellot230 文档编号:1326526 上传时间:2019-10-17 格式:DOC 页数:2 大小:33.50KB
下载 相关 举报
【计算机类职业资格】二级JAVA机试-209及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】二级JAVA机试-209及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、二级 JAVA 机试-209 及答案解析(总分:100.00,做题时间:90 分钟)一、1基本操作题(总题数:1,分数:30.00)如图所示。(分数:30.00)填空项 1:_填空项 1:_二、2简单应用题(总题数:1,分数:40.00)如图所示。(分数:40.00)填空项 1:_填空项 1:_三、3综合应用题(总题数:1,分数:30.00)如图所示。(分数:30.00)填空项 1:_填空项 1:_填空项 1:_二级 JAVA 机试-209 答案解析(总分:100.00,做题时间:90 分钟)一、1基本操作题(总题数:1,分数:30.00)如图所示。(分数:30.00)填空项 1:_ (正确答

2、案:javax.swing.JOptionPane)解析:填空项 1:_ (正确答案:INFORMATION_MESSAGE)解析:解析 本程序中用到了 JOptionPane,它是 Swing 构件,所以在程序的开头应导入javax.swing.JOptionPane 包,所以第一处应填入“javax.swing.JOptionPane”。通过观察知道显示对话框是一个消息型对话框,所以 showMessageDialog()方法的第四个参数是 JOptionPane.INFORM ATION_MESSACE,第二处应填入“INFORMATION_MESSACE”。二、2简单应用题(总题数:1

3、分数:40.00)如图所示。(分数:40.00)填空项 1:_ (正确答案:f=f*k)解析:填空项 1:_ (正确答案:while(k=n);)解析:解析 很明显,本题用到了 do-while 循环。根据阶乘的定义,n!是 1n 的整数进行的 n 次相乘,所以第二处应填入“while(k=n);”,即共循环 n 次,注意后面的分号不要遗漏。为了实现 1n 的整数相乘,第一处应该填入“f=f*k”,经过 n 次循环后,f=(k-1)!,执行 f=f*k 后,f=k!。所以经过 n 次循环后,=n!。三、3综合应用题(总题数:1,分数:30.00)如图所示。(分数:30.00)填空项 1:_ (正确答案:extends)解析:填空项 1:_ (正确答案:init)解析:填空项 1:_ (正确答案:label)解析:解析 很显然,Java_3 类继承自 JApplet 类,所以第一处应填入“extends”,表明 Java_3 与JApplet 之间的继承关系。对于 Applet 的定义接下来要进行初始化工作,即重载 init()方法,所以第二处应填入“init”。第三处要在顶层容器的内容面板中添加一个定义好的 JLabel,所以应填入“label”。

展开阅读全文
相关资源
猜你喜欢
  • GOST R 54729-2011 Food common salt Measurement (determination) of moisture mass fraction by thermo-gravimetric method《普通食盐 水分质量分数的的热失重测量(测定)方法》.pdf GOST R 54729-2011 Food common salt Measurement (determination) of moisture mass fraction by thermo-gravimetric method《普通食盐 水分质量分数的的热失重测量(测定)方法》.pdf
  • GOST R 54730-2011 Food common salt Measurement (determination) of potassium-ion mass fraction by flame-photometric method《普通食盐 钾离子质量分数的火焰光度计的测量(测定)方法》.pdf GOST R 54730-2011 Food common salt Measurement (determination) of potassium-ion mass fraction by flame-photometric method《普通食盐 钾离子质量分数的火焰光度计的测量(测定)方法》.pdf
  • GOST R 54731-2011 Pressed bakery yeast Specifications《压缩面包酵母 规格》.pdf GOST R 54731-2011 Pressed bakery yeast Specifications《压缩面包酵母 规格》.pdf
  • GOST R 54732-2011 Quality management Customer satisfaction Guidelines for monitoring and measuring《质量管理 客户满意度 监控和测量指南》.pdf GOST R 54732-2011 Quality management Customer satisfaction Guidelines for monitoring and measuring《质量管理 客户满意度 监控和测量指南》.pdf
  • GOST R 54733-2011 Medical-social expertise Document circulation in federal state institutes of vedical-social expertise Printed and electronic forms of input and output documents《社.pdf GOST R 54733-2011 Medical-social expertise Document circulation in federal state institutes of vedical-social expertise Printed and electronic forms of input and output documents《社.pdf
  • GOST R 54734-2011 Rehabilitation of invalids Recording reporting documentation rehabilitation service《残疾人康复 记录报告文档康复服务》.pdf GOST R 54734-2011 Rehabilitation of invalids Recording reporting documentation rehabilitation service《残疾人康复 记录报告文档康复服务》.pdf
  • GOST R 54735-2011 Rehabilitation of invalids Requirements to the personnel of establishments of rehabilitation of invalids《残疾人康复 残疾人康复机构的人员要求》.pdf GOST R 54735-2011 Rehabilitation of invalids Requirements to the personnel of establishments of rehabilitation of invalids《残疾人康复 残疾人康复机构的人员要求》.pdf
  • GOST R 54736-2011 Rehabilitation of invalids Special hardware of establishments service rehabilitation of invalids《残疾人康复 残疾人康复服务机构的专用硬件》.pdf GOST R 54736-2011 Rehabilitation of invalids Special hardware of establishments service rehabilitation of invalids《残疾人康复 残疾人康复服务机构的专用硬件》.pdf
  • GOST R 54737-2011 Medical-social expertise Documentation service of medical-social expertise《社会医疗专业知识 社会医疗专业知识的文档服务》.pdf GOST R 54737-2011 Medical-social expertise Documentation service of medical-social expertise《社会医疗专业知识 社会医疗专业知识的文档服务》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1