更多"在下列代码的下划线处应填入的内容是()。 public class F"的相关试题:
[单项选择]在下列代码的下画线处应填入的内容是( )。
public class FirstSample
public static void main(______args[])(
System.out.println("你好!");
A. staff
B. double
C. int
D. String
[单项选择]
要得到某目录下的所有文件名,在下列代码的下划线处应填入的内容是()。(两个下划线的内容相同)
______pathname=new______(args[0]);
String[] filename=pathname.list( );
A. File InputStream
B. File OutputStream
C. File
D. Random AccessFile
[单项选择]
在程序的下划线处应填入的选项是()
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.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
[单项选择]下列代码中,将引起编译错误的行是( )。
① public class test
② public static void main(String args[])
③ float f=0.0;
④ f+=1.0;
⑤
⑥
A. 第2行
B. 第3行
C. 第4行
D. 第6行
[单项选择]要得到某目录下的所有文件名,在下列代码的下画线处应填入的内容是(两个下画线的填写内容相同)______pathName=new______(args[0]);
String[]fileNames=pathName.list( );
A. FileInputStream
B. FileOutputStream
C. File
D. RandomAccessFile
[单项选择]下列程序的执行结果是 ( ) public class Testaa } public static void main(String args[]) {System.out.println(5/2); } }
A. 2.5
B. 2.0
C. 2.50
D. 2
[单项选择]下列程序的执行结果是( )。
public class Testhh {
public static void main(String args [] ) {
Strings1=new String("I am boy");
Strings2=new String("I am boy");
System.out.println(s1.equals(s2));
}
}
A. true
B. false
C. I am boy
D. 都不正确
[单项选择]下列程序的执行结果是( )。
public class Testff{
public static void main(String args[]){
String sl=new String("I am boy");
String s2=new String("I am boy");
System.out.println(sl==s2);
}
}
A. * * 0 * *
B. * * 1 * *
C. * * 2 * *
D. 0
[单项选择]下列程序的执行结果是( )。
public class Testcc {
public static void main (String args[ ])
{System.out.println(213.5f%4.0f);
}
}
A. public
B. protected
C. private
D. static
[单项选择]下列程序的执行结果是( )。
public class Testdd {
public static void main (String args[ ]){
inr a=lO,b=4,c=20,d=6;
System.out.println(a++*b+c,--D) ;
}
}
A. 300
B. 1200
C. 140
D. 144