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

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

1、二级 JAVA 机试-210 及答案解析(总分: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:_二级 JAVA 机试-210 答案解析(总分:100.00,做题时间:90 分钟)一、1基本操作题(总题数:1,分数:30.00)如图所示。(分数:30.00)填空项 1:_ (正确答案:Apple

2、t)解析:填空项 1:_ (正确答案:drawString)解析:解析 在 Java 语言中,每一个小应用程序(Applet)都必须是 Applet 的子类,所以 Java_1 类应该继承自 Applet 类,第一处应填入“Applet”;Graphics 类的 public abstract void drawstring(String str,int x,int y)用于显示字符串,所以第二处应填入“drawString”。二、2简单应用题(总题数:1,分数:40.00)如图所示。(分数:40.00)填空项 1:_ (正确答案:aMatrix.length)解析:填空项 1:_ (正确答案

3、aMatrixij)解析:解析 程序中,变量 i 索引数组中元素的行号,变量 j 索引每一行中元素的列号。在外层循环中,i 不能超过二维数组的行数,即 i 要小于数组的长度,所以 iaMatrix.length;第二处要求输出元素,对于二维数组索引而言,应表示为 aMatrixij,即第 i 行第 j 列位置上的元素。三、3综合应用题(总题数:1,分数:30.00)如图所示。(分数:30.00)填空项 1:_ (正确答案:extends)解析:填空项 1:_ (正确答案:addActionListener)解析:解析 Frame 是一个类,类 Java_2 只能继承自它,所以第一处应填入“extends”关键字。为了能让 Button 响应用户事件,必须为其注册监听器,所以第二处应填入“addActionListener”,这里addActionListener()方法的参数是 new Java_2(),是因为 Java_2 实现了 ActionListener 接口,new Java_2()也具有这个接口的性质。

展开阅读全文
相关资源
猜你喜欢
  • DIN EN ISO 14509-3-2009 Small craft - Airborne sound emitted by powered recreational craft - Part 3 Sound assessment using calculation and measurement procedures (ISO 14509-3 2009).pdf DIN EN ISO 14509-3-2009 Small craft - Airborne sound emitted by powered recreational craft - Part 3 Sound assessment using calculation and measurement procedures (ISO 14509-3 2009).pdf
  • DIN EN ISO 1452-1-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf DIN EN ISO 1452-1-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf
  • DIN EN ISO 1452-2-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf DIN EN ISO 1452-2-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf
  • DIN EN ISO 1452-3-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf DIN EN ISO 1452-3-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf
  • DIN EN ISO 1452-4-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf DIN EN ISO 1452-4-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf
  • DIN EN ISO 1452-5-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf DIN EN ISO 1452-5-2010 Plastics piping systems for water supply and for buried and above-ground drainage and sewerage under pressure - Unplasticized poly(vinyl chloride) (PVC-U) - .pdf
  • DIN EN ISO 14526-1-2000 Plastics - Phenolic powder moulding compounds (PF-PMCs) - Part 1 Designation system and basis for specifications (ISO 14526-1 1999) German version EN ISO 14.pdf DIN EN ISO 14526-1-2000 Plastics - Phenolic powder moulding compounds (PF-PMCs) - Part 1 Designation system and basis for specifications (ISO 14526-1 1999) German version EN ISO 14.pdf
  • DIN EN ISO 14526-2-2000 Plastics - Phenolic powder moulding compounds (PF-PMCs) - Part 2 Preparation of test specimens and determination of properties (ISO 14526-2 1999) German ver.pdf DIN EN ISO 14526-2-2000 Plastics - Phenolic powder moulding compounds (PF-PMCs) - Part 2 Preparation of test specimens and determination of properties (ISO 14526-2 1999) German ver.pdf
  • DIN EN ISO 14526-3-2000 Plastics - Phenolic powder moulding compounds (PF-PMCs) - Part 3 Requirements for selected moulding compounds (ISO 14526-3 1999) German version EN ISO 14526.pdf DIN EN ISO 14526-3-2000 Plastics - Phenolic powder moulding compounds (PF-PMCs) - Part 3 Requirements for selected moulding compounds (ISO 14526-3 1999) German version EN ISO 14526.pdf
  • 相关搜索

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

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