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

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

1、计算机二级 JAVA-130 (1)及答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序中动态定义了一个二维整型数组 a,数组 a 的第一行有 3 个元素,第二行有 5 个元素,程序将02 赋给第一行元素,将 04 赋给第二行元素,最后打印输出各数组元素。 public class exam_91 public static void main(String args) int a=new int2; a0=new int3; a1=new int5; int i,j; for(i=0;_;i+) a0i=i; for(i=0;ia1

2、length;i+) a1i=i; for(i=0;_;i+) for(j=0;_;j+) System.out.print(“a“+i+“=“+aij+“,“); System.out.println(); (分数:30.00)_2.本程序求一个二维整型数组 a 中的最小数值并赋给变量 min,其中数组 a 的第一行数据分别为:23、45、52、13、67、83、12,第二行数据分别为:45、67、14、52、7,第三行数据分别为:91、85、11,最后打印输出结果。 public class exam_92 public static void main(String args) int

3、 a=23,45,52,13,67,83,12,45,67,14,52,7,91,85,11; int i,j; int min=a00; for(i=0;_;i+) for(j=0;_;j+) if(aijmin) _; System.out.println(“min=“+min); (分数:30.00)_3.本程序统计字符串 str 中字母 a 出现的次数,其中 str 为“(* char c; int sum=0; int i=0; do c=_; if(_) sum+; i+; while(_); System.out.println(“sum=“+sum); (分数:40.00)_计

4、算机二级 JAVA-130 (1)答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序中动态定义了一个二维整型数组 a,数组 a 的第一行有 3 个元素,第二行有 5 个元素,程序将02 赋给第一行元素,将 04 赋给第二行元素,最后打印输出各数组元素。 public class exam_91 public static void main(String args) int a=new int2; a0=new int3; a1=new int5; int i,j; for(i=0;_;i+) a0i=i; for(i=0;ia1.l

5、ength;i+) a1i=i; for(i=0;_;i+) for(j=0;_;j+) System.out.print(“a“+i+“=“+aij+“,“); System.out.println(); (分数:30.00)_正确答案:()解析:第 1 处:ia0.length 第 2 处:ia.length 第 3 处:jai.length2.本程序求一个二维整型数组 a 中的最小数值并赋给变量 min,其中数组 a 的第一行数据分别为:23、45、52、13、67、83、12,第二行数据分别为:45、67、14、52、7,第三行数据分别为:91、85、11,最后打印输出结果。 publ

6、ic class exam_92 public static void main(String args) int a=23,45,52,13,67,83,12,45,67,14,52,7,91,85,11; int i,j; int min=a00; for(i=0;_;i+) for(j=0;_;j+) if(aijmin) _; System.out.println(“min=“+min); (分数:30.00)_正确答案:()解析:第 1 处:ia.length 第 2 处:jai.length 第 3 处:min=aij3.本程序统计字符串 str 中字母 a 出现的次数,其中 str 为“(* char c; int sum=0; int i=0; do c=_; if(_) sum+; i+; while(_); System.out.println(“sum=“+sum); (分数:40.00)_正确答案:()解析:第 1 处:str.charAt(i) 第 2 处:c=“a“ 第 3 处:istr.length()

展开阅读全文
相关资源
猜你喜欢
  • ITU-T F 731 SPANISH-1997 Multimedia Conference Services in the ISDN《综合业务数字网(ISDN)中的多媒体会议业务 16号研究组》.pdf ITU-T F 731 SPANISH-1997 Multimedia Conference Services in the ISDN《综合业务数字网(ISDN)中的多媒体会议业务 16号研究组》.pdf
  • ITU-T F 731-1997 Multimedia Conference Services in the ISDN (Study Group 16)《在综合业务数字网(ISDN)中的多媒体会议业务 F系列 非电话电讯服务 视听服务 研究16组》.pdf ITU-T F 731-1997 Multimedia Conference Services in the ISDN (Study Group 16)《在综合业务数字网(ISDN)中的多媒体会议业务 F系列 非电话电讯服务 视听服务 研究16组》.pdf
  • ITU-T F 732 FRENCH-1996 Multimedia Conference Services in the B-ISDN《宽带综合业务数字网(B-ISDN)中的多媒体会议业务 1号研究组》.pdf ITU-T F 732 FRENCH-1996 Multimedia Conference Services in the B-ISDN《宽带综合业务数字网(B-ISDN)中的多媒体会议业务 1号研究组》.pdf
  • ITU-T F 732 SPANISH-1996 Multimedia Conference Services in the B-ISDN《宽带综合业务数字网(B-ISDN)中的多媒体会议业务 1号研究组》.pdf ITU-T F 732 SPANISH-1996 Multimedia Conference Services in the B-ISDN《宽带综合业务数字网(B-ISDN)中的多媒体会议业务 1号研究组》.pdf
  • ITU-T F 732-1996 Multimedia Conference Services in the B-ISDN《在宽带综合业务数字网(B-ISDN)中的多媒体会议业务 F系列 非电话电讯服务 视听服务 研究1组》.pdf ITU-T F 732-1996 Multimedia Conference Services in the B-ISDN《在宽带综合业务数字网(B-ISDN)中的多媒体会议业务 F系列 非电话电讯服务 视听服务 研究1组》.pdf
  • ITU-T F 733 FRENCH-2005 Service description and requirements for multimedia conference services over IP networks《互联网协议(IP)网络上的多媒体会议业务的业务描述和要求 视听业务》.pdf ITU-T F 733 FRENCH-2005 Service description and requirements for multimedia conference services over IP networks《互联网协议(IP)网络上的多媒体会议业务的业务描述和要求 视听业务》.pdf
  • ITU-T F 733 SPANISH-2005 Service description and requirements for multimedia conference services over IP networks《互联网协议(IP)网络上的多媒体会议业务的业务描述和要求 视听业务》.pdf ITU-T F 733 SPANISH-2005 Service description and requirements for multimedia conference services over IP networks《互联网协议(IP)网络上的多媒体会议业务的业务描述和要求 视听业务》.pdf
  • ITU-T F 733-2005 Service description and requirements for multimedia conference services over IP networks - Audiovisual services《IP网络上多媒体会议业务的业务描述和要求 视听服务》.pdf ITU-T F 733-2005 Service description and requirements for multimedia conference services over IP networks - Audiovisual services《IP网络上多媒体会议业务的业务描述和要求 视听服务》.pdf
  • ITU-T F 734-2014 Definitions requirements and use cases for telepresence systems (Study Group 16)《远程呈现系统的定义、要求和用例》.pdf ITU-T F 734-2014 Definitions requirements and use cases for telepresence systems (Study Group 16)《远程呈现系统的定义、要求和用例》.pdf
  • 相关搜索

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

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