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

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

1、计算机二级 JAVA-59 及答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序统计成绩及格的学生的平均分。学生分数分别为:59,60,48,73,92,69,34,85。 public class exam_46 public static void main(String args) int score=59,60,48,73,92,69,34,85; int 1=score.length; double sum=0; int num=0; int i=0; while(i1) if(_) sum=sum+scorei; n

2、um+; _; double arerage=_; System.out.println(“The average:“+arerage); (分数:30.00)_2.本程序分别比较两个字符串“A“和“a“是否相等,并比较两个字符A和a是否相等,并输出比较结果。 public class exam_47 public static void main(String args) _; c1=A; c2=a; String str1=new String(“A“), str2=new String(“a“); if(_) System.out.println(c1+“equals“+c2); els

3、e System.out.println(c1+“doesnt equal“+c2); if(_) System.out.println(str1+“equals“+str2); else System.out.println(str1+“doesnt equal“+str2); (分数:30.00)_3.本程序的功能是计算二维数组 arr=34,21,45,67,20,23,10,3,45,76,22,3,79,56,50中的最小值,并输出。 public class exam_48 public static void main(String args) int arr=34,21,45,

4、67,20,23,10,3,45,76,22,3,79,56,50; int i=0; int j=0; int min=arr00; while(i3) while(_) if(arrijmin) min=arrij; j+; _; _; System.out.println(“The min:“+min); (分数:40.00)_计算机二级 JAVA-59 答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序统计成绩及格的学生的平均分。学生分数分别为:59,60,48,73,92,69,34,85。 public class

5、exam_46 public static void main(String args) int score=59,60,48,73,92,69,34,85; int 1=score.length; double sum=0; int num=0; int i=0; while(i1) if(_) sum=sum+scorei; num+; _; double arerage=_; System.out.println(“The average:“+arerage); (分数:30.00)_正确答案:(score i=60 i+ sum/num)解析:2.本程序分别比较两个字符串“A“和“a“

6、是否相等,并比较两个字符A和a是否相等,并输出比较结果。 public class exam_47 public static void main(String args) _; c1=A; c2=a; String str1=new String(“A“), str2=new String(“a“); if(_) System.out.println(c1+“equals“+c2); else System.out.println(c1+“doesnt equal“+c2); if(_) System.out.println(str1+“equals“+str2); else System.

7、out.println(str1+“doesnt equal“+str2); (分数:30.00)_正确答案:(char c1, c2 c1=c2 str1. equals (str2)解析:3.本程序的功能是计算二维数组 arr=34,21,45,67,20,23,10,3,45,76,22,3,79,56,50中的最小值,并输出。 public class exam_48 public static void main(String args) int arr=34,21,45,67,20,23,10,3,45,76,22,3,79,56,50; int i=0; int j=0; int min=arr00; while(i3) while(_) if(arrijmin) min=arrij; j+; _; _; System.out.println(“The min:“+min); (分数:40.00)_正确答案:(j5(或 j=5) j=0 i+(或 i=i+1 或 i+=1)解析:

展开阅读全文
相关资源
猜你喜欢
  • GOST R 50276-1992 Geotextiles Determination of thickness at specified pressures《土工织物 指定压力下厚度测定》.pdf GOST R 50276-1992 Geotextiles Determination of thickness at specified pressures《土工织物 指定压力下厚度测定》.pdf
  • GOST R 50277-1992 Geotextiles Method for determination of surface density《土工织物 表面密度测定法》.pdf GOST R 50277-1992 Geotextiles Method for determination of surface density《土工织物 表面密度测定法》.pdf
  • GOST R 50278-1992 Drill pipes with weld-on tool joints Specifications《带有焊钻杆接头的钻管 规范》.pdf GOST R 50278-1992 Drill pipes with weld-on tool joints Specifications《带有焊钻杆接头的钻管 规范》.pdf
  • GOST R 50279 1-1992 Paints and varnishes Test methods of metal content Preparation of acid extracts from paints in liquid or powder form《油漆和清漆 金属含量测试方法 液体或粉状油漆酸提取物的制备》.pdf GOST R 50279 1-1992 Paints and varnishes Test methods of metal content Preparation of acid extracts from paints in liquid or powder form《油漆和清漆 金属含量测试方法 液体或粉状油漆酸提取物的制备》.pdf
  • GOST R 50279 10-1992 Paints and varnishes Test methods of metal content Determination of total lead Flame atomic absorption spectrometric method《油漆和清漆 金属含量测试方法 总铅量的测定 火焰原子吸收光谱法》.pdf GOST R 50279 10-1992 Paints and varnishes Test methods of metal content Determination of total lead Flame atomic absorption spectrometric method《油漆和清漆 金属含量测试方法 总铅量的测定 火焰原子吸收光谱法》.pdf
  • GOST R 50279 11-1992 Paints and varnishes Test methods of metal content Determination of total mercury Flameless atomic absorption spectrometric method《油漆和清漆 金属含量测试方法 总汞量测定 无火焰原子吸收.pdf GOST R 50279 11-1992 Paints and varnishes Test methods of metal content Determination of total mercury Flameless atomic absorption spectrometric method《油漆和清漆 金属含量测试方法 总汞量测定 无火焰原子吸收.pdf
  • GOST R 50279 2-1992 Paints and varnishes Test methods of metal content Preparation of acide extract from dried paint films《油漆和清漆 金属含量测试方法 干燥漆膜酸提取物的制备》.pdf GOST R 50279 2-1992 Paints and varnishes Test methods of metal content Preparation of acide extract from dried paint films《油漆和清漆 金属含量测试方法 干燥漆膜酸提取物的制备》.pdf
  • GOST R 50279 3-1992 Paints and varnishes Test methods of metal content Determination of  soluble  lead content Flame atomic absorption spectrometric method and dithizone spectropho.pdf GOST R 50279 3-1992 Paints and varnishes Test methods of metal content Determination of soluble lead content Flame atomic absorption spectrometric method and dithizone spectropho.pdf
  • GOST R 50279 4-1992 Paints and varnishes Test methods of metal content Determination of  soluble  antimony content Flame atomic absorption spectrometric method and rhodamine B spec.pdf GOST R 50279 4-1992 Paints and varnishes Test methods of metal content Determination of soluble antimony content Flame atomic absorption spectrometric method and rhodamine B spec.pdf
  • 相关搜索

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

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