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

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

1、计算机二级 JAVA-131 (1)及答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序的功能是计算二维数组 arr 中所有元素的和,并打印输出计算结果。 public class exam_97 public static void main(String args) int arr=34,21,45,67,20,23,10,3,45,22,3,79; int i=0,j=0; int sum=0; outer:while(true) if(i=arr.length) _; while(true) if(j=arri.length)

2、 _; j=0; continue outer; sum=sum+arrij; _; System.out.println(“sum=“+sum); (分数:30.00)_2.本程序找出字符串 str 中所有的小写字母(az),并打印输出。 public class exam_98 public static void main(String args) String str=“D241ERaeERA452ADdfEAFd5T“; char c; int i=0; do c=_; if(_) System.out.print(c+“,“); i+; while(_); (分数:30.00)_3

3、下面的程序中,指定变量 b 为字节型,变量 f 为单精度实型,变量 l 为 64 位整型。 public class exam_99 public static void main(String args) _b=49; _f=8.9f; _l=0xfedl; System.out.println(“b=“+b); System.out.println(“f=“+f); System.out.println(“l=“+l); (分数:40.00)_计算机二级 JAVA-131 (1)答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序

4、的功能是计算二维数组 arr 中所有元素的和,并打印输出计算结果。 public class exam_97 public static void main(String args) int arr=34,21,45,67,20,23,10,3,45,22,3,79; int i=0,j=0; int sum=0; outer:while(true) if(i=arr.length) _; while(true) if(j=arri.length) _; j=0; continue outer; sum=sum+arrij; _; System.out.println(“sum=“+sum);

5、 (分数:30.00)_正确答案:()解析:第 1 处:break 第 2 处:i+(或 i=i+1 或 i+=1) 第 3 处:j+(或 j=j+1 或 j+=1)2.本程序找出字符串 str 中所有的小写字母(az),并打印输出。 public class exam_98 public static void main(String args) String str=“D241ERaeERA452ADdfEAFd5T“; char c; int i=0; do c=_; if(_) System.out.print(c+“,“); i+; while(_); (分数:30.00)_正确答案:()解析:第 1 处:str.charAt(i) 第 2 处:c=“a“ _f=8.9f; _l=0xfedl; System.out.println(“b=“+b); System.out.println(“f=“+f); System.out.println(“l=“+l); (分数:40.00)_正确答案:()解析:第 1 处:byte 第 2 处:float 第 3 处:long

展开阅读全文
相关资源
猜你喜欢
  • NBN-ISO 10362-1-1992 8125 Cigarettes - Determination of water in smoke condensates - Part 1  Gas-chromatographic method《卷烟烟雾凝聚物中水分的测定 第1部分:气相色谱法》.pdf NBN-ISO 10362-1-1992 8125 Cigarettes - Determination of water in smoke condensates - Part 1 Gas-chromatographic method《卷烟烟雾凝聚物中水分的测定 第1部分:气相色谱法》.pdf
  • NBN-ISO 1046-1992 8125 Architectural and building drawings - Vocabulary《建筑和施工图 词汇》.pdf NBN-ISO 1046-1992 8125 Architectural and building drawings - Vocabulary《建筑和施工图 词汇》.pdf
  • NBN-ISO 10563-1992 8750 Building construction - Sealants for joints - Determination of change in mass and volume《建筑施工 接点密封 质量和体积变化的测定》.pdf NBN-ISO 10563-1992 8750 Building construction - Sealants for joints - Determination of change in mass and volume《建筑施工 接点密封 质量和体积变化的测定》.pdf
  • NBN-ISO 10590-1992 8750 Building construction - Sealants - Determination of adhesion cohesion properties at maintained extension after immersion in water《建筑施工 密封 浸水后保持的伸展下粘附 内聚特性的测.pdf NBN-ISO 10590-1992 8750 Building construction - Sealants - Determination of adhesion cohesion properties at maintained extension after immersion in water《建筑施工 密封 浸水后保持的伸展下粘附 内聚特性的测.pdf
  • NBN-ISO 10591-1992 8750 Building construction - Sealants - Determination of adhesion cohesion properties after immersion in water《建筑结构 胶粘剂 浸入水中后黏合性的测定》.pdf NBN-ISO 10591-1992 8750 Building construction - Sealants - Determination of adhesion cohesion properties after immersion in water《建筑结构 胶粘剂 浸入水中后黏合性的测定》.pdf
  • NBN-ISO 1087-1992 3125 Terminology - Vocabulary《专门名词 词汇》.pdf NBN-ISO 1087-1992 3125 Terminology - Vocabulary《专门名词 词汇》.pdf
  • NBN-ISO 11094-1992 3125 Acoustics - Test code for the measurement of airborne noise emitted by power lawn mowers lawn tractors lawn and garden tractors with mowing attachments《声学电动.pdf NBN-ISO 11094-1992 3125 Acoustics - Test code for the measurement of airborne noise emitted by power lawn mowers lawn tractors lawn and garden tractors with mowing attachments《声学电动.pdf
  • NBN-ISO 1215-1992 7500 Commercially dry virgin cork ramassage gleanings corkwoord refuse and corkwaste Definitions and packaging《商业用未用的干燥软木,收集,拾遗软木废料和木栓 定义和包装》.pdf NBN-ISO 1215-1992 7500 Commercially dry virgin cork ramassage gleanings corkwoord refuse and corkwaste Definitions and packaging《商业用未用的干燥软木,收集,拾遗软木废料和木栓 定义和包装》.pdf
  • NBN-ISO 1216-1992 8750 Corkwood in planks Grading classification and packing《木板中的软木 筛分,分类和包装》.pdf NBN-ISO 1216-1992 8750 Corkwood in planks Grading classification and packing《木板中的软木 筛分,分类和包装》.pdf
  • 相关搜索

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

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