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

展开阅读全文
相关资源
猜你喜欢
  • DIN 51807-1-1979 Testing of lubricants Test of the behaviour of lubricating greases in the presence of water Static test《润滑剂检验 在有水的情况下润滑脂性能的测定 静态检验》.pdf DIN 51807-1-1979 Testing of lubricants Test of the behaviour of lubricating greases in the presence of water Static test《润滑剂检验 在有水的情况下润滑脂性能的测定 静态检验》.pdf
  • DIN 51807-2-1990 Testing of lubricants test on the behaviour of greases in the presence of water dynamic test《润滑剂的检验 在有水的情况下润滑脂性能的检验 动态试验》.pdf DIN 51807-2-1990 Testing of lubricants test on the behaviour of greases in the presence of water dynamic test《润滑剂的检验 在有水的情况下润滑脂性能的检验 动态试验》.pdf
  • DIN 51810-1-2017 Testing of lubricants - Testing rheological properties of lubricating greases - Part 1 Determination of shear viscosity by rotational viscosimeter and the system o.pdf DIN 51810-1-2017 Testing of lubricants - Testing rheological properties of lubricating greases - Part 1 Determination of shear viscosity by rotational viscosimeter and the system o.pdf
  • DIN 51810-2-2017 Testing of lubricants - Testing rheological properties of lubricating greases - Part 2 Determination of flow point using an oscillatory rheometer with a parallel-p.pdf DIN 51810-2-2017 Testing of lubricants - Testing rheological properties of lubricating greases - Part 2 Determination of flow point using an oscillatory rheometer with a parallel-p.pdf
  • DIN 51810-3-2016 Testing of lubricants - Testing of rheological properties of lubricating greases - Part 3 Determination of flow point with inclining rod method《润滑剂试验 润滑脂流变性能试验 第3部.pdf DIN 51810-3-2016 Testing of lubricants - Testing of rheological properties of lubricating greases - Part 3 Determination of flow point with inclining rod method《润滑剂试验 润滑脂流变性能试验 第3部.pdf
  • DIN 51811-2017 Testing of lubricants - Testing of corrosiveness to copper of greases - Copper strip tarnish test《润滑剂试验 润滑脂对铜腐蚀作用的试验 铜带去光泽试验》.pdf DIN 51811-2017 Testing of lubricants - Testing of corrosiveness to copper of greases - Copper strip tarnish test《润滑剂试验 润滑脂对铜腐蚀作用的试验 铜带去光泽试验》.pdf
  • DIN 51813-2016 Testing of lubricants - Determination of the content of foreign solid matters in lubricating greases - Particle sizes above 25 μm《润滑剂试验 润滑脂固体异物含量的测定 粒径超过25μm》.pdf DIN 51813-2016 Testing of lubricants - Determination of the content of foreign solid matters in lubricating greases - Particle sizes above 25 μm《润滑剂试验 润滑脂固体异物含量的测定 粒径超过25μm》.pdf
  • DIN 51817-2014 Testing of lubricants - Determination of oil separation from greases under static conditions《润滑剂试验 静态条件下从润滑脂中分离出油的测定》.pdf DIN 51817-2014 Testing of lubricants - Determination of oil separation from greases under static conditions《润滑剂试验 静态条件下从润滑脂中分离出油的测定》.pdf
  • DIN 51818-1981 Lubricants consistency classification of lubricating greases NLGI grades《润滑剂 润滑脂稠度分类 NLGI等级》.pdf DIN 51818-1981 Lubricants consistency classification of lubricating greases NLGI grades《润滑剂 润滑脂稠度分类 NLGI等级》.pdf
  • 相关搜索

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

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