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

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

1、计算机二级 JAVA-62及答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序将字符串 str中的字符a用$符号代替,然后将字符串中第一个$字符前的所有字符去掉,并打印输出最后的 str字符串。 public class exam_64 public static void main(String args) String str=“Iamagoodboy, andwhataboutyou?“; str=_; int pos=_; str=_; System.out.println(str); (分数:30.00)_2.本程序将

2、字符串 str(“Welcome to China!“)转化为一个字符数组 c,然后将字符数组按数组下标逆序输出。 public class exam_65 public static void main(String args) String str=“Welcome to China!“; char c; _; _; int i; for(_) System.out.print(ci); (分数:30.00)_3.本程序生成一个大小为 200200的窗口,并将窗口的背景色设为黑色。 import java.awt.*; public class exam_66_ public static

3、 void main(String args) exam 66 fr=new exam_66(); _; _; fr.setVisible(true); (分数:40.00)_计算机二级 JAVA-62答案解析(总分:100.00,做题时间:90 分钟)一、B基本操作题/B(总题数:3,分数:100.00)1.本程序将字符串 str中的字符a用$符号代替,然后将字符串中第一个$字符前的所有字符去掉,并打印输出最后的 str字符串。 public class exam_64 public static void main(String args) String str=“Iamagoodboy,

4、 andwhataboutyou?“; str=_; int pos=_; str=_; System.out.println(str); (分数:30.00)_正确答案:(str.replace(a, $) str.indexOf(“$“) str.substring (pos)解析:2.本程序将字符串 str(“Welcome to China!“)转化为一个字符数组 c,然后将字符数组按数组下标逆序输出。 public class exam_65 public static void main(String args) String str=“Welcome to China!“; ch

5、ar c; _; _; int i; for(_) System.out.print(ci); (分数:30.00)_正确答案:(c=new charstr.length() str.getChars(0, str.length(), c, 0) i=c.length-1; i=0; i-)解析:3.本程序生成一个大小为 200200的窗口,并将窗口的背景色设为黑色。 import java.awt.*; public class exam_66_ public static void main(String args) exam 66 fr=new exam_66(); _; _; fr.setVisible(true); (分数:40.00)_正确答案:(extends Frame fr.setSize (200, 200) fr.setBackground (Color.black)解析:

展开阅读全文
相关资源
猜你喜欢
  • BS EN ISO 8503-4-2012 Preparation of steel substrates before application of paints and related products Surface roughness characteristics of blast-cleaned steel substrates Method fa.pdf BS EN ISO 8503-4-2012 Preparation of steel substrates before application of paints and related products Surface roughness characteristics of blast-cleaned steel substrates Method fa.pdf
  • BS EN ISO 8503-5-2017 Preparation of steel substrates before application of paints and related products Surface roughness characteristics of blast-cleaned steel substrates Replica  .pdf BS EN ISO 8503-5-2017 Preparation of steel substrates before application of paints and related products Surface roughness characteristics of blast-cleaned steel substrates Replica .pdf
  • BS EN ISO 8504-1-2001 Preparation of steel substrates before application of paints and related products - Surface preparation methods - General principles《涂料和有关产品使用前钢衬底的制备 表面制备方法 通.pdf BS EN ISO 8504-1-2001 Preparation of steel substrates before application of paints and related products - Surface preparation methods - General principles《涂料和有关产品使用前钢衬底的制备 表面制备方法 通.pdf
  • BS EN ISO 8504-3-2001 Preparation of steel substrates before application of paints and related products - Surface preparation methods - Hand- and power-tool cleaning《涂料和有关产品使用前钢衬底的.pdf BS EN ISO 8504-3-2001 Preparation of steel substrates before application of paints and related products - Surface preparation methods - Hand- and power-tool cleaning《涂料和有关产品使用前钢衬底的.pdf
  • BS EN ISO 8510-2-2010 Adhesives Peel test for a flexible-bonded-to-rigid test specimen assembly 180 degree peel《粘合剂 软料与硬料粘合试样组件剥离试验 180剥离》.pdf BS EN ISO 8510-2-2010 Adhesives Peel test for a flexible-bonded-to-rigid test specimen assembly 180 degree peel《粘合剂 软料与硬料粘合试样组件剥离试验 180剥离》.pdf
  • BS EN ISO 8528-13-2016 Reciprocating internal combustion engine driven alternating current generating sets Safety《往复式内燃机驱动的交流发电机组 安全性》.pdf BS EN ISO 8528-13-2016 Reciprocating internal combustion engine driven alternating current generating sets Safety《往复式内燃机驱动的交流发电机组 安全性》.pdf
  • BS EN ISO 8534-2017 Animal and vegetable fats and oils Determination of water content Karl Fischer method (pyridine free)《动物和植物的脂肪和油 水分的测定 卡尔·费休法(无吡啶)》.pdf BS EN ISO 8534-2017 Animal and vegetable fats and oils Determination of water content Karl Fischer method (pyridine free)《动物和植物的脂肪和油 水分的测定 卡尔·费休法(无吡啶)》.pdf
  • BS EN ISO 8536-1-2011 Infusion equipment for medical use Infusion glass bottles《医用输液设备 输液玻璃瓶》.pdf BS EN ISO 8536-1-2011 Infusion equipment for medical use Infusion glass bottles《医用输液设备 输液玻璃瓶》.pdf
  • BS EN ISO 8536-10-2015 Infusion equipment for medical use Accessories for fluid lines for single use with pressure infusion equipment《医用输液设备 与压力输液仪器一起单一使用的输液管附件》.pdf BS EN ISO 8536-10-2015 Infusion equipment for medical use Accessories for fluid lines for single use with pressure infusion equipment《医用输液设备 与压力输液仪器一起单一使用的输液管附件》.pdf
  • 相关搜索

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

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