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

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

1、计算机二级 JAVA-73及答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序统计字符数组 c中小写字母(az)的个数,并将它们变成大写字母(已知字符 a对应的 ASCII比A对应的 ASCII大 32)。 public class exam_79 public static void main(String args) char c=“a“,“D“,“W“,“f“,“q“,“P“,“i“,“o“; _; for(int i=0;ic.length;i+) if(ci=“a“ _; System.out.println(“sum=“+

2、sum); System.out.println(c); (分数:30.00)_2.本程序求整型数组 a(a=45,22,91,87,45,96,78)中的最大元素,并打印输出计算结果。 public class exam_80 public static void main(String args) int a=45,22,91,87,45,96,78); _; int i=1; while(_) if(aimax) _; i+; System.out.println(“Max=“+max); (分数:30.00)_3.本程序找出字符串数组 arr=“welcome“,“China“,“hi

3、congratulation“,“great“;中长度最大的元素,并打印输出。 public class exam_81 public static void main(String args) _arr=“welcome“,“China“,“hi“,“congratulation“,“great“; int i=0; int pos=0; int length=0; while(_) if(arri.length()length) length=arri.length(); _; i+; System.out.println(“The string of max length is:“

4、arrpos); (分数:40.00)_计算机二级 JAVA-73答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序统计字符数组 c中小写字母(az)的个数,并将它们变成大写字母(已知字符 a对应的 ASCII比A对应的 ASCII大 32)。 public class exam_79 public static void main(String args) char c=“a“,“D“,“W“,“f“,“q“,“P“,“i“,“o“; _; for(int i=0;ic.length;i+) if(ci=“a“ _; System

5、out.println(“sum=“+sum); System.out.println(c); (分数:30.00)_正确答案:()解析:第 1处:int sum=0 第 2处:(char) 第 3处:sum+(或 sum=sum+1或 sum+=1)2.本程序求整型数组 a(a=45,22,91,87,45,96,78)中的最大元素,并打印输出计算结果。 public class exam_80 public static void main(String args) int a=45,22,91,87,45,96,78); _; int i=1; while(_) if(aimax) _

6、 i+; System.out.println(“Max=“+max); (分数:30.00)_正确答案:()解析:第 1处:int max=a0 第 2处:ia.length 第 3处:max=ai3.本程序找出字符串数组 arr=“welcome“,“China“,“hi“,“congratulation“,“great“;中长度最大的元素,并打印输出。 public class exam_81 public static void main(String args) _arr=“welcome“,“China“,“hi“,“congratulation“,“great“; int i=0; int pos=0; int length=0; while(_) if(arri.length()length) length=arri.length(); _; i+; System.out.println(“The string of max length is:“+arrpos); (分数:40.00)_正确答案:()解析:第 1处:String 第 2处:iarr.length 第 3处:pos=i

展开阅读全文
相关资源
猜你喜欢
  • KS P ISO 21671-2009 Dentistry-Rotary polishers《牙科学 旋转抛光器》.pdf KS P ISO 21671-2009 Dentistry-Rotary polishers《牙科学 旋转抛光器》.pdf
  • KS P ISO 22112-2009 Dentistry-Artificial teeth for dental prostheses《牙科学 牙修复术用假牙》.pdf KS P ISO 22112-2009 Dentistry-Artificial teeth for dental prostheses《牙科学 牙修复术用假牙》.pdf
  • KS P ISO 22674-2009 Dentistry-Metallic materials for fixed and removable restorations and appliances《牙科学 固定式和可摘式修复体和牙科器具用金属材料》.pdf KS P ISO 22674-2009 Dentistry-Metallic materials for fixed and removable restorations and appliances《牙科学 固定式和可摘式修复体和牙科器具用金属材料》.pdf
  • KS P ISO 22794-2009 Dentistry-Implantable materials for bone filling and augmentation in oral and maxillofacial surgery-Contents of a technical file《牙科学 口腔和上颌面外科中骨填充物和增加物用植入材料 技术文档.pdf KS P ISO 22794-2009 Dentistry-Implantable materials for bone filling and augmentation in oral and maxillofacial surgery-Contents of a technical file《牙科学 口腔和上颌面外科中骨填充物和增加物用植入材料 技术文档.pdf
  • KS P ISO 22803-2013 Dentistry-Membrane materials for guided tissue regeneration in oral and maxillofacial surgery-Contents of a technical file《牙科学 口腔及颌面外科中受控制的组织再生用薄膜材料 技术文档的内容》.pdf KS P ISO 22803-2013 Dentistry-Membrane materials for guided tissue regeneration in oral and maxillofacial surgery-Contents of a technical file《牙科学 口腔及颌面外科中受控制的组织再生用薄膜材料 技术文档的内容》.pdf
  • KS P ISO 22870-2009 Point-of-care testing(POCT)-Requirements for quality and competence《护理点试验(POCT) 质量和能力要求》.pdf KS P ISO 22870-2009 Point-of-care testing(POCT)-Requirements for quality and competence《护理点试验(POCT) 质量和能力要求》.pdf
  • KS P ISO 23317-2009 Implants for surgery-In vitro evaluation for apatite-forming ability of implant materials《外科植入物 植入材料磷灰石形成能力的体外评估》.pdf KS P ISO 23317-2009 Implants for surgery-In vitro evaluation for apatite-forming ability of implant materials《外科植入物 植入材料磷灰石形成能力的体外评估》.pdf
  • KS P ISO 23328-2-2009 Breathing system filters for anaesthetic and respiratory use-Part 2:Non-filtration aspects《麻醉和呼吸用呼吸系统过滤器 第2部分 非过滤特性》.pdf KS P ISO 23328-2-2009 Breathing system filters for anaesthetic and respiratory use-Part 2:Non-filtration aspects《麻醉和呼吸用呼吸系统过滤器 第2部分 非过滤特性》.pdf
  • KS P ISO 23600-2011 Assistive products for persons with vision impairments and persons with vision and hearing impairments-Acoustic and tactile signals for pedestrian traffic light.pdf KS P ISO 23600-2011 Assistive products for persons with vision impairments and persons with vision and hearing impairments-Acoustic and tactile signals for pedestrian traffic light.pdf
  • 相关搜索
    资源标签

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

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