网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

(对象的反序列化)为使下列代码正常运行 ,应该在下划线填入的选项是 ObjectInputStream in = new _____________(new FileInputStream("employee. dat")) ; Employee[ ] newStaff = (Employee[ ])in . readObject(); in.close() ;

A.InputStream

B.Reader

C.ObjectInput

D.ObjectInputStream


参考答案和解析
ABD
更多 “(对象的反序列化)为使下列代码正常运行 ,应该在下划线填入的选项是 ObjectInputStream in = new _____________(new FileInputStream("employee. dat")) ; Employee[ ] newStaff = (Employee[ ])in . readObject(); in.close() ;A.InputStreamB.ReaderC.ObjectInputD.ObjectInputStream” 相关考题
考题 在J2EE中,某一java程序中有如下代码:DataInputStream din=new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat")));System.out.print(din.readByte());假设在employee.dat文件中只有如下一段字符:abcdefg。则:System.out在屏幕上打印()。A.aB.bC.97D.98

考题 为使下列代码正常运行,应该在下划线处填入的选项是ObjectInputStream in=new_____(new FileInputStream(“employee . dat”));Employee[]newStaff=(Employee[〕)in.readObject();in .cIose();A.ReaderB.InputStreamC.ObjectInputD.ObjectInputStream

考题 为使下列代码正常运行,应该在下划线处填入的选项是int〔〕numbers=new int[n];for(Int i=0;i numbers.____;i++)numbers[i]=i+1;A.sizeB.lengthC.dimensionD.measurement

考题 下面程序中需要对 Employee 的对象进行存储,请在下划线处填入正确选项。class Employee implements ___________{…… }A)ComparableB)SerializableC)CloneableD)DataInput

考题 阅读下列 Java 语句ObjectOutputStream outNew ObjectOutputStream {new_______( “ employee.dat ” )};在下划线处,应填的正确选项是A ) FileB ) FileWriterC ) FileOutputStreamD ) OutputStream

考题 为使下列代码正常运行,应该在下画线处填入的选 项是( )。 int[]numbers=new int[n]; for(int i=0;inumbers. ;i++) numbers[i]=i+1:A.sizeB.lengthC.dimensionD.measurement

考题 阅读下面Java语句 ObjectOutputStream ut=new ObjectOutputStream(new______("employee.dat"));在下画线处,应填的正确选项是A.FileB.FileWriterC.FileOutputStreamD.OutputStream

考题 下面程序中需要对Employee的对象进行存储,请在下划线处填入正确选项。 class Employee implements______ { ……}A.ComparableB.SerializableC.CloneableD.Datalnput

考题 为使下列代码正常运行,应该在下画线处填入的选项是( )。 A.ReaderB.InputStreamSXB 为使下列代码正常运行,应该在下画线处填入的选项是( )。A.ReaderB.InputStreamC.ObjectInputD.ObjectInputStream

考题 为使下列代码正常运行,应该在下画线处填入的选项是( )。A.staticB.privateC.abstractD.final

考题 为使下列代码正常运行,应该在下画线处填入的选项是( )。 int[]numbers=new int[n]; for(int i=0;inumbers. ;i++) numbers[i]=i+1:A.sizeB.lengthC.dimensionD.measurement

考题 在读字符文件Employee.dat时,使用该文件作为参数的类是A.BufferedReaderB.DataInputStreamC.DataOutputStreamD.FileInputStream

考题 要从“file.dat”文件中读出第10个字节存到变量C中,下列______方法是合适的。A.FileInputStream in=new FileInputStream("file.dat");in.skip(9);int c=in.read( );B.FileInputStream in=new FileInputStream("file.dat");in.skip(10);int c=in.read( );C.FileInputStream in=new FileInputStream("file.dat");int c=in.read( );D.RandomAccessFile in=new RandomAccessFile("file.dat");in.skip(9);int c=in.readByte( );

考题 为使下列代码正常运行,应该在下画线处填入的选项是( )。 ObjectInputStream In= new (new FilelnputStream("employee. doc")); Employee[]newstaff=(Employee[])in.readObject ; In.close;A.ReaderB.InputStreamC.ObjectlnputD.ObjectlnputStream

考题 阅读下列Java语句: ObjectOutputStream Ut=new ObjectOutputStream(new (employee.datemployee.dat));在下画线处,应填的正确选项是( )。A.FileB.FileWriterC.FileOutputStreamD.Outputstream

考题 阅读下列Java语句: ObjectOutputStream Ut=new ObjectOutputStream(new ("employee.dat")); 在下画线处,应填的正确选项是( )。A.FileB.FileWriterC.FileOutputStreamD.Outputstream

考题 阅读厂列Java语句 ObjectOutputStreamout=new ObjectOu中utStream(new______("employee.daf")); 在下划线处,应填的正确选项是( )。A.FileB.FileWriterC.FileOutputStreamD.Outputstream

考题 为使下列代码正常运行,应该在下画线处填入的选项是( )。 ObjectlnputStream In= new (new FilelnputStream("employee. doc")): Employee[]newstaff=(Employee[])in.readobject ; In.close;A.ReaderB.InputStreamC.ObjectlnputD.ObjectlnputStream

考题 已知类的继承关系如下:class Employee;class Manager extends Employeer;class Director extends Employee;则以下语句能通过编译的有哪些? A.Employee e=new Manager();B.Director d=new Manager();C.Director d=new Employee();D.Manager m=new Director();

考题 下列代码实现从文件file.dat中读出第5个字节到变量c中,横线处应该填入下列项中的______。 import java.io.*; public class exl5 { public static void main(String[] args) { try System.out.println((char)c); catch(Exception e) { e.printStackTrace(); } } }A.FileInputStream in = new FileInputStream("chl/file.dat"); in.skip(4); int c = in.read();B.FileInputStream in = new FileInputStream("chl/file.dat"); in.skip(5); int c = in.read();C.Fi2eInputStream in = new FileInputStream("file.dat"); int c = in.read();D.RandomAccessFile in = new RandomAccessFile ("chi/file. dat "); in.skip (4); int c = in.readByte();

考题 要从文件" file.dat"文件中读出第10个字节到变量C中,下列哪个方法适合? ()A、 FileInputStream in=new FileInputStream("file.dat"); in.skip(9); int c=in.read();B、 FileInputStream in=new FileInputStream("file.dat"); in.skip(10); int c=in.read();C、 FileInputStream in=new FileInputStream("file.dat"); int c=in.read();D、 RandomAccessFile in=new RandomAccessFile("file.dat"); in.skip(9); int c=in.readByte();

考题 要从文件"file.dat"中读出第10个字节到变量c中,下列哪个方法适合?()A、FileInputStream in=new FileInputStream("file.dat");in.skip(9);intc=in.read()B、FileInputStream in=new FileInputStream("file.dat");in.skip(10);intc=in.read()C、FileInputStream in=new FileInputStream("file.dat");intc=in.read()D、RandomAccessFile in=new RandomAccessFile("file.dat");in.skip(9);intc=in.readByte()

考题 单选题在j2ee中,某一Java程序中有如下代码:  DataInputStream din =new DataInputStream(new BufferedInputStream(new FileInputStream("employee.dat"))); System.out.print(din.readByte());  假设在employee.dat文件中只有如下一段字符:abcdefg.则:System.out在屏幕上打印()A  aB  bC 97D 98

考题 单选题要从文件" file.dat"文件中读出第10个字节到变量C中,下列哪个方法适合? ()A  FileInputStream in=new FileInputStream(file.dat); in.skip(9); int c=in.read();B  FileInputStream in=new FileInputStream(file.dat); in.skip(10); int c=in.read();C  FileInputStream in=new FileInputStream(file.dat); int c=in.read();D  RandomAccessFile in=new RandomAccessFile(file.dat); in.skip(9); int c=in.readByte();

考题 单选题阅读下列Java语句:ObjectOutputStream out=new ObjectOutputStream(new ______(employee.dat));在下画线处,应填的正确选项是(  )。A FileB FileWriterC FileOutputStreamD OutputStream

考题 单选题要从文件"file.dat"中读出第10个字节到变量c中,下列哪个方法适合?()A FileInputStream in=new FileInputStream(file.dat);in.skip(9);intc=in.read()B FileInputStream in=new FileInputStream(file.dat);in.skip(10);intc=in.read()C FileInputStream in=new FileInputStream(file.dat);intc=in.read()D RandomAccessFile in=new RandomAccessFile(file.dat);in.skip(9);intc=in.readByte()

考题 单选题为使下列代码正常运行,应该在下画线处填入的选项是(  )。 int[] numbers=new int[n]; for (int i=0; i<numbers. ______;i++) numbers[i]=i+1;A sizeB lengthC dimensionD measurement

考题 单选题为使下列代码正常运行,应该在下画线处填人的选项是(  )。ObjectInputStream in = new ____(new FileInputStream(employee.dat));Employee[] newStaff = (Employee[]) in.readObject();in.close();A ReaderB InputStreamC ObjectInputD ObjectInputStream