在下面程序的空白处,应填入的正确选项是 import java.io.*; public class ObjectStreamTest {  public static void main(String args[])throws IOE

admin2012-03-21  32

问题 在下面程序的空白处,应填入的正确选项是    import java.io.*;    public class ObjectStreamTest {     public static void main(String args[])throws IOExeeption }      ObjectoutputStream oos=new ObjectOutputStream(new FileOutputStream("serial.bin"));      java.util.Date d=new java.util.Date();      oos. ______(d);      ObjectInputStream ois=new ObjecttInputStream(new FileInputStream("serial.bin"));      try{       java.util.Date restoredDate=(java.util.Date)ois.readObject();       System.out.println("read object back from serial.bin file:"+restoredDate);      } catch(classNotFoundException cnf) {       System.out.println("class not found");      }     }    }   

选项 A、WriterObject
B、 write   
C、BufferedWriter
D、writerObject

答案D

解析
转载请注明原文地址:https://kaotiyun.com/show/An2p777K
0

最新回复(0)