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

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

1、计算机二级 JAVA-67及答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序比较两个实型对象 d1和 d2的大小,并输出比较结果。其中对象 d1和对象 d2的值都是 7.2,打印输出结果为:Equal!。 public static void main(String args) Double d1=_(7.2); Double d2=_(“7.2“); if(_) System.out.println(“Equal!“); else System.out.println(“Unequal!“); (分数:30.00)_2.本程

2、序求 120 间所有奇数的和,并打印输出最终结果。 public class exam_68 public static void main(String args) int sum=0; for(int i=1; _) if(_) _; sum=sum+i; System.out.println(“sum:“+sum); (分数:30.00)_3.本程序将字符串 str中非字母的字符(非 az 或 AZ 的字符)打印输出。 public class exam_69 public static void main(String args) String str=“df53#D%#AHTU(ER

3、W)AFGD“; _; int i=0; while(in) char c=_; if(!(c=a _; (分数:40.00)_计算机二级 JAVA-67答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序比较两个实型对象 d1和 d2的大小,并输出比较结果。其中对象 d1和对象 d2的值都是 7.2,打印输出结果为:Equal!。 public static void main(String args) Double d1=_(7.2); Double d2=_(“7.2“); if(_) System.out.println(

4、Equal!“); else System.out.println(“Unequal!“); (分数:30.00)_正确答案:(new Double new Double d1.equals (d2)解析:2.本程序求 120 间所有奇数的和,并打印输出最终结果。 public class exam_68 public static void main(String args) int sum=0; for(int i=1; _) if(_) _; sum=sum+i; System.out.println(“sum:“+sum); (分数:30.00)_正确答案:(i=20; i+ i%2=0 continue)解析:3.本程序将字符串 str中非字母的字符(非 az 或 AZ 的字符)打印输出。 public class exam_69 public static void main(String args) String str=“df53#D%#AHTU(ERW)AFGD“; _; int i=0; while(in) char c=_; if(!(c=a _; (分数:40.00)_正确答案:(int n=str.length() str.charAt (i) i+(或 i=i+1或 i+=1)解析:

展开阅读全文
相关资源
猜你喜欢
  • ETSI ETS 300 603-1994 European Digital Cellular Telecommunications System (Phase 2) Interworking between a Public Land Mobile Network (PLMN) and a Packet Switched Public Data Netwo_1.pdf ETSI ETS 300 603-1994 European Digital Cellular Telecommunications System (Phase 2) Interworking between a Public Land Mobile Network (PLMN) and a Packet Switched Public Data Netwo_1.pdf
  • ETSI ETS 300 604-1999 Digital Cellular Telecommunications System (Phase 2) General Requirements on Interworking between the Public Land Mobile Network (PLMN) and the Integrated Ser.pdf ETSI ETS 300 604-1999 Digital Cellular Telecommunications System (Phase 2) General Requirements on Interworking between the Public Land Mobile Network (PLMN) and the Integrated Ser.pdf
  • ETSI ETS 300 604-1999 Digital Cellular Telecommunications System (Phase 2) General Requirements on Interworking between the Public Land Mobile Network (PLMN) and the Integrated Ser_1.pdf ETSI ETS 300 604-1999 Digital Cellular Telecommunications System (Phase 2) General Requirements on Interworking between the Public Land Mobile Network (PLMN) and the Integrated Ser_1.pdf
  • ETSI ETS 300 605-1998 Digital Cellular Telecommunications System (Phase 2) Information Element Mapping between Mobile Station - Base Station System (MS - BSS) and Base Station Syst.pdf ETSI ETS 300 605-1998 Digital Cellular Telecommunications System (Phase 2) Information Element Mapping between Mobile Station - Base Station System (MS - BSS) and Base Station Syst.pdf
  • ETSI ETS 300 605-1998 Digital Cellular Telecommunications System (Phase 2) Information Element Mapping between Mobile Station - Base Station System (MS - BSS) and Base Station Syst_1.pdf ETSI ETS 300 605-1998 Digital Cellular Telecommunications System (Phase 2) Information Element Mapping between Mobile Station - Base Station System (MS - BSS) and Base Station Syst_1.pdf
  • ETSI ETS 300 606-1996 Digital Cellular Telecommunications System (Phase 2) Signalling Interworking for Supplementary Services (GSM 09 11 Second Edition Version 4 6 1)《数字蜂窝通信系统(第2阶段.pdf ETSI ETS 300 606-1996 Digital Cellular Telecommunications System (Phase 2) Signalling Interworking for Supplementary Services (GSM 09 11 Second Edition Version 4 6 1)《数字蜂窝通信系统(第2阶段.pdf
  • ETSI ETS 300 606-1996 Digital Cellular Telecommunications System (Phase 2) Signalling Interworking for Supplementary Services (GSM 09 11 Second Edition Version 4 6 1)《数字蜂窝通信系统(第2阶段_1.pdf ETSI ETS 300 606-1996 Digital Cellular Telecommunications System (Phase 2) Signalling Interworking for Supplementary Services (GSM 09 11 Second Edition Version 4 6 1)《数字蜂窝通信系统(第2阶段_1.pdf
  • ETSI ETS 300 607-2-1996 Digital Cellular Telecommunications System (Phase 2) Mobile Station (MS) Conformance Specification Part 2 Protocol Implementation Conformance Statement (PIC.pdf ETSI ETS 300 607-2-1996 Digital Cellular Telecommunications System (Phase 2) Mobile Station (MS) Conformance Specification Part 2 Protocol Implementation Conformance Statement (PIC.pdf
  • ETSI ETS 300 607-2-1996 Digital Cellular Telecommunications System (Phase 2) Mobile Station (MS) Conformance Specification Part 2 Protocol Implementation Conformance Statement (PIC_1.pdf ETSI ETS 300 607-2-1996 Digital Cellular Telecommunications System (Phase 2) Mobile Station (MS) Conformance Specification Part 2 Protocol Implementation Conformance Statement (PIC_1.pdf
  • 相关搜索

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

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