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

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

1、二级 JAVA 机试-67 及答案解析(总分:100.00,做题时间:90 分钟)一、B1基本操作题/B(总题数:1,分数:30.00)程序如下:Java_1. javaimport java. applet. *;import java. awt. Graphics;* Found *public class Java_1 extends U( 1 ) /Upublic void paint( Graphics g)* Found *g. U(2) /U(“欢迎你来参加 Java 语言考试!“,25,25);(分数:30.00)(1).(分数:15.00)_(2).(分数:15.00)_二、

2、B2简单应用题/B(总题数:1,分数:40.00)(分数:40.00)(1).(分数:20.00)_(2).(分数:20.00)_三、B3综合应用题/B(总题数:1,分数:30.00)(分数:30.00)(1).(分数:15.00)_(2).(分数:15.00)_二级 JAVA 机试-67 答案解析(总分:100.00,做题时间:90 分钟)一、B1基本操作题/B(总题数:1,分数:30.00)程序如下:Java_1. javaimport java. applet. *;import java. awt. Graphics;* Found *public class Java_1 exten

3、ds U( 1 ) /Upublic void paint( Graphics g)* Found *g. U(2) /U(“欢迎你来参加 Java 语言考试!“,25,25);(分数:30.00)(1).(分数:15.00)_正确答案:()解析:(2).(分数:15.00)_正确答案:()解析:drawstring 分析 在 Java 语言中,每一个小应用程序(Applet)都必须是 Ap- plet 的子类,所以Java_1 类应该继承自 Applet 类,第一处应填入“Applet”;Graphics 类的 public abstract void drawstring(String s

4、tr,int x,int y)用于显示字符串,所以第二处应填入“drawstring”。二、B2简单应用题/B(总题数:1,分数:40.00)(分数:40.00)(1).(分数:20.00)_正确答案:()解析:(2).(分数:20.00)_正确答案:()解析:aMatrixij 分析 程序中,变量 i 索引数组中元素的行号,变量 j 索引每一行中元素的列号。在外层循环中,i 不能超过二维数组的行数,即 i 要小于数组的长度,所以 iaM- atrix.length;第二处要求输出元素,对于二维数组索引而言,应表示为 aMatrixij,即第 i 行第 j 列位置上的元素。三、B3综合应用题/

5、B(总题数:1,分数:30.00)(分数:30.00)(1).(分数:15.00)_正确答案:()解析:(2).(分数:15.00)_正确答案:()解析:addActionListener 分析 Frame 是一个类,类 Java_2 只能继承自它,所以第一处应填入“extends”关键字。为了能让 Button 响应用户事件,必须为其注册监听器,所以第二处应填入“addActionListener,这里 addActionListener( )方法的参数是 new Java_2( ),是因为 Java_2 实现了 ActionListen- er 接口,new Java_2( )也具有这个接口的性质。

展开阅读全文
相关资源
猜你喜欢
  • ISO 21690-2006 Glass in building - Glass blocks - Specification and test methods《建筑物玻璃 玻璃砖 规范和试验方法》.pdf ISO 21690-2006 Glass in building - Glass blocks - Specification and test methods《建筑物玻璃 玻璃砖 规范和试验方法》.pdf
  • ISO 2172-1983 Fruit juice Determination of soluble solids content Pycnometric method《果汁 可溶性固形物含量的测定 比重瓶法》.pdf ISO 2172-1983 Fruit juice Determination of soluble solids content Pycnometric method《果汁 可溶性固形物含量的测定 比重瓶法》.pdf
  • ISO 21727-2016 Cinematography - Method of measurement of perceived loudness of short duration motion-picture audio material《摄影 短时间电影音频材料的感觉级音量的测量方法》.pdf ISO 21727-2016 Cinematography - Method of measurement of perceived loudness of short duration motion-picture audio material《摄影 短时间电影音频材料的感觉级音量的测量方法》.pdf
  • ISO 2174-1990 Surface active agents preparation of water with known calcium hardness《表面活性剂 已知钙硬度水的制备》.pdf ISO 2174-1990 Surface active agents preparation of water with known calcium hardness《表面活性剂 已知钙硬度水的制备》.pdf
  • ISO 2176 CORR 1-2001 Petroleum products - Lubricating grease - Determination of dropping point Technical Corrigendum 1《石油产品 润滑脂 滴点的测定 技术勘误1》.pdf ISO 2176 CORR 1-2001 Petroleum products - Lubricating grease - Determination of dropping point Technical Corrigendum 1《石油产品 润滑脂 滴点的测定 技术勘误1》.pdf
  • ISO 2176-1995 Petroleum products - Lubricating grease - Determination of dropping point《石油产品 润滑脂 滴点的测定》.pdf ISO 2176-1995 Petroleum products - Lubricating grease - Determination of dropping point《石油产品 润滑脂 滴点的测定》.pdf
  • ISO 21809-4-2009 Petroleum and natural gas industries - External coatings for buried or submerged pipelines used in pipeline transportation systems - Part 4 Pol.pdf ISO 21809-4-2009 Petroleum and natural gas industries - External coatings for buried or submerged pipelines used in pipeline transportation systems - Part 4 Pol.pdf
  • ISO 21847-1-2007 Nuclear fuel technology - Alpha spectrometry - Part 1 Determination of neptunium in uranium and its compounds《核燃料技术 α光谱测定法 第1部分 铀及其化合物中镎的测定》.pdf ISO 21847-1-2007 Nuclear fuel technology - Alpha spectrometry - Part 1 Determination of neptunium in uranium and its compounds《核燃料技术 α光谱测定法 第1部分 铀及其化合物中镎的测定》.pdf
  • ISO 21847-2-2007 Nuclear fuel technology - Alpha spectrometry - Part 2 Determination of plutonium in uranium and its compounds《核燃料技术 α光谱测定法 第2部分 铀及其化合物中钚的测定》.pdf ISO 21847-2-2007 Nuclear fuel technology - Alpha spectrometry - Part 2 Determination of plutonium in uranium and its compounds《核燃料技术 α光谱测定法 第2部分 铀及其化合物中钚的测定》.pdf
  • 相关搜索

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

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