【计算机类职业资格】二级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 20148-1974 Pattern plate with shallow changeable wooden insert for moulding box having inside dimensions 800x700 mm for moulding foundry machines with turn of half mould with .pdf GOST 20148-1974 Pattern plate with shallow changeable wooden insert for moulding box having inside dimensions 800x700 mm for moulding foundry machines with turn of half mould with .pdf
  • GOST 20149-1974 Pattern plate with shallow changeable wooden inserts for moulding box having inside dimensions 800x700 mm for moulding foundry machines without turn of half mould w.pdf GOST 20149-1974 Pattern plate with shallow changeable wooden inserts for moulding box having inside dimensions 800x700 mm for moulding foundry machines without turn of half mould w.pdf
  • GOST 20150-1974 Pattern plate with shallow changeable wooden inserts for moulding box having inside dimensions 600x500 mm for moulding foundry machines without turn of half mould w.pdf GOST 20150-1974 Pattern plate with shallow changeable wooden inserts for moulding box having inside dimensions 600x500 mm for moulding foundry machines without turn of half mould w.pdf
  • GOST 20151-1974 Shallow changeable wooden inserts by length from 406 to 806 mm width from 306 to 706 mm for pattern plates Design and dimensions《模板用长406~806mm,宽306~706mm可换小形木垫 结构及尺.pdf GOST 20151-1974 Shallow changeable wooden inserts by length from 406 to 806 mm width from 306 to 706 mm for pattern plates Design and dimensions《模板用长406~806mm,宽306~706mm可换小形木垫 结构及尺.pdf
  • GOST 20152-1974 Shallow changeable wooden insert by length 806 mm width 706 mm for pattern plates Design and dimensions《模板用长806mm,宽706mm可换小形木垫 结构及尺寸》.pdf GOST 20152-1974 Shallow changeable wooden insert by length 806 mm width 706 mm for pattern plates Design and dimensions《模板用长806mm,宽706mm可换小形木垫 结构及尺寸》.pdf
  • GOST 20153-1974 Shallow changeable wooden insert by length 798 mm width 698 mm for pattern plates Design and dimensions《模板用长798mm,宽698mm可换小形木垫 结构及尺寸》.pdf GOST 20153-1974 Shallow changeable wooden insert by length 798 mm width 698 mm for pattern plates Design and dimensions《模板用长798mm,宽698mm可换小形木垫 结构及尺寸》.pdf
  • GOST 20154-1974 Shallow changeable wooden insert by length 606 mm width 506 mm for pattern plates Design and dimensions《木模板用长606mm,宽506mm可换小形木垫 结构及尺寸》.pdf GOST 20154-1974 Shallow changeable wooden insert by length 606 mm width 506 mm for pattern plates Design and dimensions《木模板用长606mm,宽506mm可换小形木垫 结构及尺寸》.pdf
  • GOST 20155-1974 Pattern plates with deep changeable wooden inserts for moulding box having inside dimensions 400x300 mm 450x350 mm 500x400 mm for moulding foundry machines without dime.pdf GOST 20155-1974 Pattern plates with deep changeable wooden inserts for moulding box having inside dimensions 400x300 mm 450x350 mm 500x400 mm for moulding foundry machines without dime.pdf
  • GOST 20156-1974 Pattern plates with changeable wooden insert for moulding box having inside dimensions 1000x600 mm for moulding foundry machines without turn of half mould with squ.pdf GOST 20156-1974 Pattern plates with changeable wooden insert for moulding box having inside dimensions 1000x600 mm for moulding foundry machines without turn of half mould with squ.pdf
  • 相关搜索

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

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