为使下列代码正常运行,应该在下划线处填入的选项是
ObjectInputStream in=
new_____(new FileInputStream(“employee . dat”));
Employee[]newStaff=(Employee[〕)in.readObject();
in .cIose();
A.Reader
B.InputStream
C.ObjectInput
D.ObjectInputStream
第1题:
为使下列代码正常运行,应该在下划线处填入的选项是()abstract class Person { private String name; public Person (String n) { name = n; } public ____________String get Description(); public String getName() { return name; } }
A.private
B.abstract
C.final
D.static
第2题:
(对象的反序列化)为使下列代码正常运行 ,应该在下划线填入的选项是 ObjectInputStream in = new _____________(new FileInputStream("employee. dat")) ; Employee[ ] newStaff = (Employee[ ])in . readObject(); in.close() ;
A.InputStream
B.Reader
C.ObjectInput
D.ObjectInputStream
第3题:
为使下列代码正常运行,应该在下划线【 】处填入的选项是 abstract class Person{ private String name; public Person(String n){ name=n; } public 【 】 String getDescription(); public String getName(){ return name; } }
A.static
B.private
C.abstract
D.final
第4题:
为使下列代码正常运行,应该在下划线处填入的选项是() abstract class Person { public Person (String n) { name = n; } public ____________String getDescription(); public String getName() { return name; } private String name; }
A.private
B.abstract
C.final
D.static
第5题:
3、为使下列代码正常运行,应该在下划线处填入的选项是() abstract class Person { public Person (String n) { name = n; } public ____________String getDescription(); public String getName() { return name; } private String name; }
A.private
B.abstract
C.final
D.static