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

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

1、计算机二级 JAVA-68及答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序求 120 的 20个自然数中,所有 3的倍数的和,并打印输出求和结果。 public clas s exam_76 public static void main(String args) _; int i; for(_) if(_) sum=sum+i; System.out.println(“sum=“+sum); (分数:30.00)_2.本程序定义了一个求两个数的最大值的方法 max,并调用该方法计算 67和 23的最大值。 public c

2、lass exam_77 public static void main(String args) exam_77 temp=new exam_77(); int res=max(67,23); System.out.println(“res=“+res); static int max(_) int maxNum; if(ab) _; else maxNum=b; _ (分数:30.00)_3.本程序的功能是定义了求长方形周长的方法 rang,并调用该方法计算长和宽分别为 67和 23的长方形的周长。 public class exam_78 public static void main(

3、String args) _; temp=new exam_78(); int res=rang(67,23); System.out.println(“res=“+res); static _ rang(int width, int length) int zc; zc=(width+length)*2; _; (分数:40.00)_计算机二级 JAVA-68答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序求 120 的 20个自然数中,所有 3的倍数的和,并打印输出求和结果。 public clas s exam_76 p

4、ublic static void main(String args) _; int i; for(_) if(_) sum=sum+i; System.out.println(“sum=“+sum); (分数:30.00)_正确答案:(int sum=0 i=1; i=20; i+ i%3=0)解析:2.本程序定义了一个求两个数的最大值的方法 max,并调用该方法计算 67和 23的最大值。 public class exam_77 public static void main(String args) exam_77 temp=new exam_77(); int res=max(67,

5、23); System.out.println(“res=“+res); static int max(_) int maxNum; if(ab) _; else maxNum=b; _ (分数:30.00)_正确答案:(int a, int b maxNum=a return maxNum)解析:3.本程序的功能是定义了求长方形周长的方法 rang,并调用该方法计算长和宽分别为 67和 23的长方形的周长。 public class exam_78 public static void main(String args) _; temp=new exam_78(); int res=rang(67,23); System.out.println(“res=“+res); static _ rang(int width, int length) int zc; zc=(width+length)*2; _; (分数:40.00)_正确答案:(basic temp int return zc)解析:

展开阅读全文
相关资源
猜你喜欢
  • GOST IEC 61188-5-3-2013 Printed boards and printed board assemblies Design and use Part 5-3 Attachment (land joint) considerations Components with gull-wing leads on two sides《印制板和.pdf GOST IEC 61188-5-3-2013 Printed boards and printed board assemblies Design and use Part 5-3 Attachment (land joint) considerations Components with gull-wing leads on two sides《印制板和.pdf
  • GOST IEC 61188-5-4-2013 Printed boards and printed board assemblies Design and use Part 5-4 Attachment (land joint) considerations Components with J leads on two sides《印制板和印制板组件 设计.pdf GOST IEC 61188-5-4-2013 Printed boards and printed board assemblies Design and use Part 5-4 Attachment (land joint) considerations Components with J leads on two sides《印制板和印制板组件 设计.pdf
  • GOST IEC 61188-5-5-2013 Printed boards and printed board assemblies Design and use Part 5-5 Attachment (land joint) considerations Components with gull-wing leads on four sides《印制板.pdf GOST IEC 61188-5-5-2013 Printed boards and printed board assemblies Design and use Part 5-5 Attachment (land joint) considerations Components with gull-wing leads on four sides《印制板.pdf
  • GOST IEC 61188-5-6-2013 Printed boards and printed board assemblies Design and use Part 5-6 Attachment (land joint) considerations Chip carriers with J-leads on four sides《印制板和印制板组.pdf GOST IEC 61188-5-6-2013 Printed boards and printed board assemblies Design and use Part 5-6 Attachment (land joint) considerations Chip carriers with J-leads on four sides《印制板和印制板组.pdf
  • GOST IEC 61188-5-8-2013 Printed boards and printed board assemblies Design and use Part 5-8 Attachment (land joint) considerations Area array components (BGA FBGA CGA LGA)《印制板和印制板组.pdf GOST IEC 61188-5-8-2013 Printed boards and printed board assemblies Design and use Part 5-8 Attachment (land joint) considerations Area array components (BGA FBGA CGA LGA)《印制板和印制板组.pdf
  • GOST IEC 61189-3-2013 Test methods for electrical materials printed boards and other interconnection structures and assemblies Part 3 Test methods for interconnection structures (p.pdf GOST IEC 61189-3-2013 Test methods for electrical materials printed boards and other interconnection structures and assemblies Part 3 Test methods for interconnection structures (p.pdf
  • GOST IEC 61195-2012 Double-capped fluorescent lamps Safety specifications《双管座的荧光灯 安全性规范》.pdf GOST IEC 61195-2012 Double-capped fluorescent lamps Safety specifications《双管座的荧光灯 安全性规范》.pdf
  • GOST IEC 61199-2011 Single-capped fluorescent lamps Safety specifications《单头荧光灯 安全性规范》.pdf GOST IEC 61199-2011 Single-capped fluorescent lamps Safety specifications《单头荧光灯 安全性规范》.pdf
  • GOST IEC 61210-2011 Connecting devices Flat quick-connect terminations for electrical copper conductors Safety requirements《连接装置 铜导线用快接扁端子 安全性要求》.pdf GOST IEC 61210-2011 Connecting devices Flat quick-connect terminations for electrical copper conductors Safety requirements《连接装置 铜导线用快接扁端子 安全性要求》.pdf
  • 相关搜索

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

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