题目内容
在下面程序的空白处,应填入的正确选项是 import java.io.*; public class ObjectStreamTest { public static void main(String args[])throws IOExeeption } ObjectoutputStream os=new ObjectOutputStream(new FileOutputStream("serial.bin")); java.util.Date d=new java.util.Date(); oos. ______(d); ObjectInputStream is=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"); } } }
查看答案
搜索结果不匹配?点我反馈