首页 试题详情
单选题

在下列程序的空白处,应填入的正确选项是: import java.io.*; pulilc class ObjectStreamTest{   publilc static void main(string args[]) throws IOException{     ObjectOutputStream oos= new ObjectOutputStream (new FileOutputStream("serial.bin"));     java.util.Date d= new Java.util.Date();     oos. ______ (d);     ObjectInputStream ois= new ObjectInputStream(new FileOutputStream("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");     }   } }

AWriterObject

BWriter

CBufferedWriter

DwriteObject

正确答案:A (备注:此答案有误)

相似试题

  • 单选题

    下列程序空白填入正确选项: import java.io.*; public class writeInt{   public static void main(string[] a) {     int[ ] myArray = {10,20,30,40};     try{       DataOutputSystem dos= new DataOutputSystem(new FileOutputSystem(ints.dat));       for(int i=0;i

    答案解析

  • 单选题

    下列程序空白填入正确选项: import java.io.*; pulilc class ObjectStreamTest{   publilc static void main(string args[]) throws IOException{     ObjectOutputStream oos= new ObjectOutputStream (new FileOutputStream(serial.bin));     java.util.Date d= new Java.util.Date();     oos. ______ (d);     ObjectInputStream ois= new ObjectInputStream(new FileOutputStream(serial.bin));     try{       java.util.date restoredDate = (java.util.Date) ois.readObject();       System.out.println (read object back from ser

    答案解析

  • 多选题

    关于二审抗诉程序下列哪些选项正确?()

    答案解析

  • 多选题

    下列关于死刑复核程序与第二审程序选项中,正确有:()

    答案解析

  • 单选题

    下列程序功能统计字符串中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

    答案解析

热门题库