【计算机类职业资格】二级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( )也具有这个接口的性质。

展开阅读全文
相关资源
猜你喜欢
  • EN 14116-2012 en Tanks for transport of dangerous goods - Digital interface for product recognition devices for liquid fuels (Incorporates Amendment A1 2014)《危险货物运输坦克 数字接口为液体燃料产品识别.pdf EN 14116-2012 en Tanks for transport of dangerous goods - Digital interface for product recognition devices for liquid fuels (Incorporates Amendment A1 2014)《危险货物运输坦克 数字接口为液体燃料产品识别.pdf
  • EN 14117-2004 en Products systems for the protection and repair of concrete structures - Test methods - Determination of time of efflux of cementitious injection products《混凝土结构的保护和.pdf EN 14117-2004 en Products systems for the protection and repair of concrete structures - Test methods - Determination of time of efflux of cementitious injection products《混凝土结构的保护和.pdf
  • EN 14118-1-2003 en Reinforcement Specifications for textile glass mats (chopped strand and continuous filament mats) Part 1 Designation《增强材料 玻璃丝毡(切短玻璃丝束和连续长丝毡片)规范 第1部分 名称》.pdf EN 14118-1-2003 en Reinforcement Specifications for textile glass mats (chopped strand and continuous filament mats) Part 1 Designation《增强材料 玻璃丝毡(切短玻璃丝束和连续长丝毡片)规范 第1部分 名称》.pdf
  • EN 14118-2-2003 en Reinforcement Specifications for textile glass mats (chopped strand and continuous filament mats) Part 2 Methods of test and general requirements《增强材料 玻璃丝毡(切短玻璃丝.pdf EN 14118-2-2003 en Reinforcement Specifications for textile glass mats (chopped strand and continuous filament mats) Part 2 Methods of test and general requirements《增强材料 玻璃丝毡(切短玻璃丝.pdf
  • EN 14118-3-2003 en Reinforcement Specifications for textile glass mats (chopped strand and continuous filament mats) Part 3 Specific requirements《增强材料 纺织玻璃纤维毡片(切短玻璃丝和连续长丝毡片)规范 第3部分.pdf EN 14118-3-2003 en Reinforcement Specifications for textile glass mats (chopped strand and continuous filament mats) Part 3 Specific requirements《增强材料 纺织玻璃纤维毡片(切短玻璃丝和连续长丝毡片)规范 第3部分.pdf
  • EN 14119-2003 en Testing of textiles Evaluation of the action of microfungi《纺织材料的试验 微真菌影响的评价》.pdf EN 14119-2003 en Testing of textiles Evaluation of the action of microfungi《纺织材料的试验 微真菌影响的评价》.pdf
  • EN 1412-1995 Copper and Copper Alloys - European Numbering System《铜和铜合金 欧洲材料号码系统》.pdf EN 1412-1995 Copper and Copper Alloys - European Numbering System《铜和铜合金 欧洲材料号码系统》.pdf
  • EN 1412-2016 en Copper and copper alloys - European numbering system《铜及铜合金-欧洲编号系统》.pdf EN 1412-2016 en Copper and copper alloys - European numbering system《铜及铜合金-欧洲编号系统》.pdf
  • EN 14121-2009 en Aluminium and aluminium alloys - Sheet strip and plate for electrotechnical applications《铝和铝合金 电工用薄板材 带材和板材》.pdf EN 14121-2009 en Aluminium and aluminium alloys - Sheet strip and plate for electrotechnical applications《铝和铝合金 电工用薄板材 带材和板材》.pdf
  • 相关搜索

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

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