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

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

1、计算机二级 JAVA-69 及答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序定义了常量 a 为字符类型,变量 b 为布尔型,变量 c 为字节型。其中 a 为字符 T,b 为布尔值true,c 为 13。 public class exam_73 public static void main(String args) _ a=T; _ b=true; _ c=13; System.out.println(“a=“+a); System.out.println(“b=“+b); System.out.println(“c=“+

2、c); (分数:30.00)_2.本程序生成类 exam_74 的一个对象 temp,并调用该对象的方法 opera。方法 opera 中计算整型变量 a 和双精度浮点型变量 b 的和,并打印输出结果,其中 a 为 34,b 为 1。 public class exam_74 public static void main(String args) exam_74 temp=_; _; _opera() int a=34; double b=1; System.out.println(a+b); (分数:30.00)_3.本程序定义了一个长度为 10 的 boolean 型数组,并给数组元素赋

3、值,要求如果数组元素下标为奇数的话,则数组元素值为 false,否则为 true。 public class exam_75 public static void main(String args) boolean b=_; for(int i=0; i10; i+) if(_) bi=false; else _; for(int i=0; i10; i+) System.out.print(“b“+i+“=“+bi+“, “); (分数:40.00)_计算机二级 JAVA-69 答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程

4、序定义了常量 a 为字符类型,变量 b 为布尔型,变量 c 为字节型。其中 a 为字符 T,b 为布尔值true,c 为 13。 public class exam_73 public static void main(String args) _ a=T; _ b=true; _ c=13; System.out.println(“a=“+a); System.out.println(“b=“+b); System.out.println(“c=“+c); (分数:30.00)_正确答案:(final char boolean byte)解析:2.本程序生成类 exam_74 的一个对象 t

5、emp,并调用该对象的方法 opera。方法 opera 中计算整型变量 a 和双精度浮点型变量 b 的和,并打印输出结果,其中 a 为 34,b 为 1。 public class exam_74 public static void main(String args) exam_74 temp=_; _; _opera() int a=34; double b=1; System.out.println(a+b); (分数:30.00)_正确答案:(new basic() temp.opera() void)解析:3.本程序定义了一个长度为 10 的 boolean 型数组,并给数组元素赋值,要求如果数组元素下标为奇数的话,则数组元素值为 false,否则为 true。 public class exam_75 public static void main(String args) boolean b=_; for(int i=0; i10; i+) if(_) bi=false; else _; for(int i=0; i10; i+) System.out.print(“b“+i+“=“+bi+“, “); (分数:40.00)_正确答案:(new boolean10 i%2!=0 bi=true)解析:

展开阅读全文
相关资源
猜你喜欢
  • GOST R ISO 1182-2014 Fire tests for construction materials and products Non-combustibility test《建筑材料和制品的燃烧试验 不可燃性试验》.pdf GOST R ISO 1182-2014 Fire tests for construction materials and products Non-combustibility test《建筑材料和制品的燃烧试验 不可燃性试验》.pdf
  • GOST R ISO 11843-1-2007 Statistical methods Capability of detection Part 1 Terms and definitions《统计方法 检测能力 第1部分 术语和定义》.pdf GOST R ISO 11843-1-2007 Statistical methods Capability of detection Part 1 Terms and definitions《统计方法 检测能力 第1部分 术语和定义》.pdf
  • GOST R ISO 11843-2-2007 Statistical methods Capability of detection Part 2 Methodology in the linear calibration case《统计方法 检测能力 第2部分 直线校准方法》.pdf GOST R ISO 11843-2-2007 Statistical methods Capability of detection Part 2 Methodology in the linear calibration case《统计方法 检测能力 第2部分 直线校准方法》.pdf
  • GOST R ISO 11843-5-2012 Statistical methods Capability of detection Part 5 Methodology in the linear and non-linear calibration cases《统计方法 检测能力 第5部分 线性和非线性校准情况下的方法学》.pdf GOST R ISO 11843-5-2012 Statistical methods Capability of detection Part 5 Methodology in the linear and non-linear calibration cases《统计方法 检测能力 第5部分 线性和非线性校准情况下的方法学》.pdf
  • GOST R ISO 11843-7-2014 Statistical methods Capability of detection Part 7 Methods of an estimation taking into account background noise《统计方法 检测能力 第7部分 结合考虑背景噪声的评估方法》.pdf GOST R ISO 11843-7-2014 Statistical methods Capability of detection Part 7 Methods of an estimation taking into account background noise《统计方法 检测能力 第7部分 结合考虑背景噪声的评估方法》.pdf
  • GOST R ISO 12003-1-2011 Agricultural and forestry tractors Roll-over protective structures on narrow-track wheeled tractors Part 1 Front-mounted ROPS Technical requirements and tea.pdf GOST R ISO 12003-1-2011 Agricultural and forestry tractors Roll-over protective structures on narrow-track wheeled tractors Part 1 Front-mounted ROPS Technical requirements and tea.pdf
  • GOST R ISO 12005-2013 Laser and laser-related equipment Test methods for laser beam parameters Polarization《激光和激光相关设备 激光光束参数的试验方法 极化作用》.pdf GOST R ISO 12005-2013 Laser and laser-related equipment Test methods for laser beam parameters Polarization《激光和激光相关设备 激光光束参数的试验方法 极化作用》.pdf
  • GOST R ISO 12039-2011 Stationary source emissions Determination of carbon monoxide carbon dioxide and oxygen Performance characteristics and calibration of automated measuring syst.pdf GOST R ISO 12039-2011 Stationary source emissions Determination of carbon monoxide carbon dioxide and oxygen Performance characteristics and calibration of automated measuring syst.pdf
  • GOST R ISO 1207-2013 Slotted cheese head screws Product grade A《开槽圆柱头螺钉 产品等级A》.pdf GOST R ISO 1207-2013 Slotted cheese head screws Product grade A《开槽圆柱头螺钉 产品等级A》.pdf
  • 相关搜索
    资源标签

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

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