public class Length{
public static void main(String args[]){
System.out.println( " number of String args: " +args. ( 11 ) );
}
}
[试题]请在下划线处填入代码,是程序正常运行并且输出 “ Hello! ”C.lass Test ( 15 ) {Public static void main (String[] arge){Test t = new Test();t.start();}Public void run(){System.out.println( “ Hello! ” );}
[试题]下列程序构造了一个 Swing Applet ,请在下划线处填入正确的代码Import javax.swing.*;Import java.awt.*;Public class SwingApplet extends ( 13 ) {Jlabel l = new Jlabel ( “ This is a Swing Applet. ” );Public void init(){C.ontainer contentPane = getContentPane();contentPane.add(1);
[试题]( 15 )在下列 Java Applet 程序的下划线处填入代码,使程序完整并能够正确运行。import java.applet.*;import java.awt.*;public class HelloWorld ( 15 ) {public void paint(Graphics g){g.drawString( " Hello World! " ,25,25);}}
[试题]( 11 )在下列程序的下划线处,填入适当语句使程序能正确执行并输出异常栈信息。public class ThrowableException{public static void main(String args[]){try{throw new Throwable(" 这里是本人定义的异常 ");}catch(Throwable e){System.out.println("Caught Throwable");System.out.println("e.getMessage():
[单选题]下面程序中需要对 Employee 的对象进行存储,请在下划线处填入正确选项。class Employee implements ___________{…… }A.)ComparableB.)SerializableC.)CloneableD.)DataInput
[单选题]下面程序中需要对Employee的对象进行存储,请在下划线处填入正确选项。 class Employee implements______ { ……}A.ComparableB.SerializableC.CloneableD.Datalnput
[试题]( 11 )请在下列程序的空白处,填上适当的内容:Import java. awt. *;Import java. util. *;C.lass BufferTest{Public static void main(string args[])Throws IOException{F.ileOutputStream unbuf=new FileOutputStream( “ test.one ” ) ;B.ufferedOutputStream buf=new ( 11 ) (new FileOu
[单选题]下列Java语句从指定网址读取html文件,在下划线处应填上的选项是( )。 Readerin=new______(newURL(urlString).openStream());A.ReaderB.DataOutputStreamC.ByteArraylnputStreamD.InputStreamReader
[单选题]要得到某目录下的所有文件名,在下列代码的下划线处应填入的内容是(两个下划线的填写内容相同)______pathName=new______(args[0]);String[]fileNames=pathname.list();A.) FIlelnputStreamB.) FileOutputStreamC.) FileD.) RandomAccessFileA.B.C.D.
[单选题]为使下列代码正常运行,应该在下划线处填入的选项是ObjectInputStream in=new_____(new FileInputStream(“employee . dat”));E.mployee[]newStaff=(Employee[〕)in.readObject();in .cIose();A.ReaderB.InputStreamC.ObjectInputD.ObjectInputStream