题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-05-14 03:27:37

[单选题]在程序的下划线处应填入的选项是:   public class Test_____{   public static void main(String args[]){   Test t = new Test();   Thread tt = new Thread(t);   tt.start();   }   public void run(){   for(int i=0;i<5;i++){   System.out.println("i="+i);   }   }   }
A.implements Runnable
B.extends Thread
C.implements Thread
D.extends Runnable

更多"[单选题]在程序的下划线处应填入的选项是:   public clas"的相关试题:

[单选题]在程序的下划线处应填入的选项是:   public class Test_____{   public static void main(String args[]){   Test t = new Test();   Thread tt = new Thread(t);   tt.start();   }   public void run(){   for(int i=0;i<5;i++){   System.out.println("i="+i);   }   }   }
A.implements Runnable
B.extends Thread
C.implements Thread
D.extends Runnable
[单选题]下列程序的功能是将一个整数数组写入二进制文件。在程序的下划线处应填入的选项是:   import java.io.*;   public class XieShuzu{   public static void main(String[] a){   int [] myArray={10,20,30,40};   try{   DataOutputStream dos=   new DataOutputStream(new FileOutputStream("ints.dat"));   for(int i=0;i   dos. _____(myArray[i]);   dos.close();   System.out.println("已经将整数数组写入二进制文件:ints.dat");   }catch(IOException ioe)   {System.out.println("IO Exception");}   }   }
A.writeArray
B.writeByte
C.writeInt
D.writeDouble
[单选题]在下列代码的下划线处应填入的内容是: public class FirstSample { public static void main(_____ args[]) { System.out.println("你好!"); } } }
A.staff
B.double
C.int
D.String
[单选题]下列代码的下划线处应填入的方法名是: import java.applet.*; import java.awt.*; public class Hello extends Applet { public void _____(Graphics g){ g.drawString("How are you!", 10, 10); } }
A.repaint
B.println
C.paint
D.show
[单选题]要得到某目录下的所有文件名,在下列代码的下划线处应填入的内容是(两个下划线的内容相同): _____ pathname = new _____(args[0]); String[] filename = pathname.list();
A.FileInputStream
B.FileOutputStream
C.File
D.RandomAccessFile
[单选题]下列程序的功能是统计字符串中"array"的个数,在程序的空白处应填入的正确选项是:   public class FindKeyWords{   public static void main(sring[] args){   String text=   " An array is a data structur that stores a collection of"   + "values of the same type . You access each individual value"   + "through an integer index . For example,if a is an array"   + "of inergers, then a[i] is the ith integer in the array.";   int arrayCount =0;   int idex = -1;   String arrarStr ="array";   index = text.indexof(arrayStr);   while(index ______ 0) {   ++arrayCount;   index += arrayStr.length();   index = text.indexof(arrayStr,index);   }   System.out.println   ("the text contains" + arrayCount + "arrays");   }   }
A.<
B.=
C.<=
D.>=

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码