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

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

1、二级 JAVA 机试-60 及答案解析(总分:100.00,做题时间:90 分钟)一、1基本操作题(总题数:1,分数:30.00)1.e.printStackTrace ( );(分数:30.00)_二、2简单应用题(总题数:1,分数:40.00)2.(分数:40.00)_三、3综合应用题(总题数:1,分数:30.00)3.下面是一个 Apple(程序,其功能是播放动画。要求根据给出的 3 幅图片设计 1 个动画。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。注意:不改动程序的结构,不得增行或删行。程序运行结果如下:(分数:30.00)_二级 JAVA 机试-60 答案解析(总

2、分:100.00,做题时间:90 分钟)一、1基本操作题(总题数:1,分数:30.00)1.e.printStackTrace ( );(分数:30.00)_正确答案:(new byteSysteminread(buffername);fwrite(buffername,0,bytesblock);)解析:解析本题主要考查基本数据类型、对文件的操作知识。解答本题的关键是熟练掌握基本数据类型、对文件的操作知识。在本题中,byte buffername=byte100;语句的功能是定义含 100 个整型元素的数组buffername,Systeminread(buffername);语句的功能是获

3、得标准控制台的输入数据,fwrite(buffemame,0,bytesblock);语句的功能是将从标准控制台获得的输入数据写入文件输出流中。二、2简单应用题(总题数:1,分数:40.00)2.(分数:40.00)_正确答案:(btnNextaddActionListener(al)btnPreaddActionListener(al)解析:解析本题主要考查工具栏和卡片布局的基本使用。解题关键是熟悉工具栏的设计和卡片布局的管理,熟悉事件处理机制,会制作图像按钮,会制作自己的事件监听器类。本题中,第 1 个空和第 2 个空都是需要填入注册监听器的语句,这里向前和向后 2 个按钮共用一个监听器,

4、此监听器对象负责判断和处理相应的操作。三、3综合应用题(总题数:1,分数:30.00)3.下面是一个 Apple(程序,其功能是播放动画。要求根据给出的 3 幅图片设计 1 个动画。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。注意:不改动程序的结构,不得增行或删行。程序运行结果如下:(分数:30.00)_正确答案:(g.drawImage(image,0,0,null)currentImage=imgNumberimage=imagescurrentImage)解析:解析本题主要考查 Applet 图形绘制和多线程相结合制作动画的综合应用。解题关键是熟悉 Applet 生命周期,熟悉线程的编程模式,熟悉 Graphics 类的基本绘图方法和图像处理方法等。本题中,第 1 处,应该是绘制当前的 1 幅图片,image 对象定义的就是这一幅图像;第 2 处,将 currentImage 对 imgNumber 取模并把结果返回给 currentImage,作为当前图像的索引值;第 3 处,将由 currentImage 索引的图像数组中的对象的值赋给 image 对象,用于显示。

展开阅读全文
相关资源
猜你喜欢
  • BS EN 62135-2-2015 Resistance welding equipment Electromagnetic compatibility (EMC) requirements《电阻焊接设备 电磁兼容性(EMC)要求》.pdf BS EN 62135-2-2015 Resistance welding equipment Electromagnetic compatibility (EMC) requirements《电阻焊接设备 电磁兼容性(EMC)要求》.pdf
  • BS EN 62137-1-1-2007 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Pull strength test《表面安装技术 表面安装焊接接缝的环境和耐久性试验方法 拉拔强度试验》.pdf BS EN 62137-1-1-2007 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Pull strength test《表面安装技术 表面安装焊接接缝的环境和耐久性试验方法 拉拔强度试验》.pdf
  • BS EN 62137-1-2-2007 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Shear strength test《表面安装技术 表面安装焊接接缝的环境和耐久性试验方法 剪切强度试验》.pdf BS EN 62137-1-2-2007 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Shear strength test《表面安装技术 表面安装焊接接缝的环境和耐久性试验方法 剪切强度试验》.pdf
  • BS EN 62137-1-3-2009 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Cyclic drop test《表面安装技术 表面安装焊缝的环境和耐久性试验方法 循环跌落试验》.pdf BS EN 62137-1-3-2009 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Cyclic drop test《表面安装技术 表面安装焊缝的环境和耐久性试验方法 循环跌落试验》.pdf
  • BS EN 62137-1-4-2009 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Cyclic bending test《表面安装技术 表面安装焊点的环境忍受力试验方法 周期性挠曲试验》.pdf BS EN 62137-1-4-2009 Surface mounting technology - Environmental and endurance test methods for surface mount solder joint - Cyclic bending test《表面安装技术 表面安装焊点的环境忍受力试验方法 周期性挠曲试验》.pdf
  • BS EN 62137-1-5-2009 Surface mounting technology - Environmental and endurance test methods for surface mount solder joints - Part 1-5 Mechanical shear fatigue test《表面安装技术 表面安装焊接点的.pdf BS EN 62137-1-5-2009 Surface mounting technology - Environmental and endurance test methods for surface mount solder joints - Part 1-5 Mechanical shear fatigue test《表面安装技术 表面安装焊接点的.pdf
  • BS EN 62137-2004 Environmental and endurance testing - Test methods for surface-mount boards of area array type packages FBGA BGA FLGA LGA SON and QFN《环境和耐用试验 区域阵列式包装件表面安装板的试验方法FBG.pdf BS EN 62137-2004 Environmental and endurance testing - Test methods for surface-mount boards of area array type packages FBGA BGA FLGA LGA SON and QFN《环境和耐用试验 区域阵列式包装件表面安装板的试验方法FBG.pdf
  • BS EN 62137-3-2012 Electronics assembly technology Selection guidance of environmental and endurance test methods for solder joints《电子装配技术 焊缝用环境和耐久性试验方法的选择指南》.pdf BS EN 62137-3-2012 Electronics assembly technology Selection guidance of environmental and endurance test methods for solder joints《电子装配技术 焊缝用环境和耐久性试验方法的选择指南》.pdf
  • BS EN 62138-2009 Nuclear power plants - Instrumentation and control important for safety - Software aspects for computer-based systems performing category B or C functions《核电站 安全性的.pdf BS EN 62138-2009 Nuclear power plants - Instrumentation and control important for safety - Software aspects for computer-based systems performing category B or C functions《核电站 安全性的.pdf
  • 相关搜索

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

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