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

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

1、计算机二级 JAVA-77 及答案解析(总分: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.len

2、gth;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 a=2

3、3,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-77 答案解析(总分: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.length;i+

5、) 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,最后打印输出结果。 public class

6、 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()

展开阅读全文
相关资源
猜你喜欢
  • EN 14584-2013 en Non-destructive testing - Acoustic emission testing - Examination of metallic pressure equipment during proof testing - Planar location of AE sources《无损检测 声音排放测试 在.pdf EN 14584-2013 en Non-destructive testing - Acoustic emission testing - Examination of metallic pressure equipment during proof testing - Planar location of AE sources《无损检测 声音排放测试 在.pdf
  • EN 14585-1-2006 en Corrugated metal hose assemblies for pressure applications - Part 1 Requirements《压力设备用波纹金属软管组件 第1部分 要求》.pdf EN 14585-1-2006 en Corrugated metal hose assemblies for pressure applications - Part 1 Requirements《压力设备用波纹金属软管组件 第1部分 要求》.pdf
  • EN 14587-1-2007 en Railway applications - Track - Flash butt welding of rails - Part 1 New R220 R260 R260Mn and R350HT grade rails in a fixed plant《轨道交通 轨道 钢轨的闪光对接焊 第1部分 固定厂房中新的R22.pdf EN 14587-1-2007 en Railway applications - Track - Flash butt welding of rails - Part 1 New R220 R260 R260Mn and R350HT grade rails in a fixed plant《轨道交通 轨道 钢轨的闪光对接焊 第1部分 固定厂房中新的R22.pdf
  • EN 14587-2-2009 en Railway applications - Track - Flash butt welding of rails - Part 2 New R220 R260 R260Mn and R350HT grade rails by mobile welding machines at sites other than a .pdf EN 14587-2-2009 en Railway applications - Track - Flash butt welding of rails - Part 2 New R220 R260 R260Mn and R350HT grade rails by mobile welding machines at sites other than a .pdf
  • EN 14587-3-2012 en Railway applications - Track - Flash butt welding of rails - Part 3 Welding in association with crossing construction《铁路应用跟踪闪光对接焊的rails -第3部分   焊接与交叉施工》.pdf EN 14587-3-2012 en Railway applications - Track - Flash butt welding of rails - Part 3 Welding in association with crossing construction《铁路应用跟踪闪光对接焊的rails -第3部分   焊接与交叉施工》.pdf
  • EN 14591-1-2004 en Explosion prevention and protection in underground mines - Protective systems - Part 1 2-bar explosion proof ventilation structure (Incorporating Corrigendum Jan.pdf EN 14591-1-2004 en Explosion prevention and protection in underground mines - Protective systems - Part 1 2-bar explosion proof ventilation structure (Incorporating Corrigendum Jan.pdf
  • EN 14591-2-2007 en Explosion prevention and protection in underground mines - Protective systems - Part 2 Passive water trough barriers (Incorporating Corrigendum September 2008)《地.pdf EN 14591-2-2007 en Explosion prevention and protection in underground mines - Protective systems - Part 2 Passive water trough barriers (Incorporating Corrigendum September 2008)《地.pdf
  • EN 14591-4-2007 en Explosion prevention and protection in underground mines - Protective systems - Part 4 Automatic extinguishing systems for road headers (Incorporating corrigendu.pdf EN 14591-4-2007 en Explosion prevention and protection in underground mines - Protective systems - Part 4 Automatic extinguishing systems for road headers (Incorporating corrigendu.pdf
  • EN 14592-2008 en Timber structures - Dowel-type fasteners - Requirements (Incorporates Amendment A1 2012)《木结构 榫型紧固件的要求》.pdf EN 14592-2008 en Timber structures - Dowel-type fasteners - Requirements (Incorporates Amendment A1 2012)《木结构 榫型紧固件的要求》.pdf
  • 相关搜索

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

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