【计算机类职业资格】计算机二级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)解析:

展开阅读全文
相关资源
猜你喜欢
  • API RP 14B-2015 Design Installation Operation Test and Redress of Subsurface Safety Valve Systems (SIXTH EDITION) .pdf API RP 14B-2015 Design Installation Operation Test and Redress of Subsurface Safety Valve Systems (SIXTH EDITION) .pdf
  • API RP 14C-2017 Analysis Design Installation and Testing of Safety Systems for Offshore Production Facilities (EIGHTH EDITION ERTA May 2018) .pdf API RP 14C-2017 Analysis Design Installation and Testing of Safety Systems for Offshore Production Facilities (EIGHTH EDITION ERTA May 2018) .pdf
  • API RP 14E CHINESE-1991 Recommended Practice for Design and Installation of Offshore Production Platform Piping Systems (FIFTH EDITION) .pdf API RP 14E CHINESE-1991 Recommended Practice for Design and Installation of Offshore Production Platform Piping Systems (FIFTH EDITION) .pdf
  • API RP 14E-1991 Recommended Practice for Design and Installation of Offshore Production Platform Piping Systems (FIFTH EDITION)《海上生产平台管线设计、安装(ANSI API RP 14E -1992》.pdf API RP 14E-1991 Recommended Practice for Design and Installation of Offshore Production Platform Piping Systems (FIFTH EDITION)《海上生产平台管线设计、安装(ANSI API RP 14E -1992》.pdf
  • API RP 14FZ-2013 Recommended Practice for Design and Installation of Electrical Systems for Fixed and Floating Offshore Petroleum Facilities for Unclassified and Class I Zone 0 Zon.pdf API RP 14FZ-2013 Recommended Practice for Design and Installation of Electrical Systems for Fixed and Floating Offshore Petroleum Facilities for Unclassified and Class I Zone 0 Zon.pdf
  • API RP 1615-2011 Installation of Underground Petroleum Storage Systems (Sixth Edition)《地下石油存储系统的安装.第6版》.pdf API RP 1615-2011 Installation of Underground Petroleum Storage Systems (Sixth Edition)《地下石油存储系统的安装.第6版》.pdf
  • API RP 16Q-1993 Recommended Practice for Design Selection Operation and Maintenance of Marine Drilling Riser Systems (FIRST EDITION FORMERLY RP 2Q AND RP 2K)《海洋钻井隔水管系统的设计、选择、操作及维修..pdf API RP 16Q-1993 Recommended Practice for Design Selection Operation and Maintenance of Marine Drilling Riser Systems (FIRST EDITION FORMERLY RP 2Q AND RP 2K)《海洋钻井隔水管系统的设计、选择、操作及维修..pdf
  • API RP 16ST-2009 Coiled Tubing Well Control Equipment Systems (First Edition)《卷绕管充分控制设备系统.第1版》.pdf API RP 16ST-2009 Coiled Tubing Well Control Equipment Systems (First Edition)《卷绕管充分控制设备系统.第1版》.pdf
  • API RP 17A-2006 Design and Operation of Subsea Production Systems - General Requirements and Recommendations (Fourth Edition ISO 13628-1 2005 Adoption)《水下采油系统设计和操作的推荐作法.第4版.ISO 136.pdf API RP 17A-2006 Design and Operation of Subsea Production Systems - General Requirements and Recommendations (Fourth Edition ISO 13628-1 2005 Adoption)《水下采油系统设计和操作的推荐作法.第4版.ISO 136.pdf
  • 相关搜索
    资源标签

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

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