网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
(对象的串行化)下面的程序需要对Employee的对象进行存储,试在下画线处填入正确的选项。class Employee implements _______{ … }
A.Comparable
B.Serializable
C.Cloneable
D.DataInput
参考答案和解析
A
更多 “(对象的串行化)下面的程序需要对Employee的对象进行存储,试在下画线处填入正确的选项。class Employee implements _______{ … }A.ComparableB.SerializableC.CloneableD.DataInput” 相关考题
考题
为使下列代码正常运行,应该在下划线处填入的选项是ObjectInputStream in=new_____(new FileInputStream(“employee . dat”));Employee[]newStaff=(Employee[〕)in.readObject();in .cIose();A.ReaderB.InputStreamC.ObjectInputD.ObjectInputStream
考题
在下面Java Applet程序的下画线处填入代码,使程序完整并能够正确运行。import java.applet.*;import java.awt.*;public class HelloWorld ______ {public void paint(Graphics g) {g.drawString("Hello World!",25,25);}}
考题
下面程序中需要对 Employee 的对象进行存储,请在下划线处填入正确选项。class Employee implements ___________{…… }A)ComparableB)SerializableC)CloneableD)DataInput
考题
下面程序中需要对Employee的对象进行存储,横线处应填入的语句是( )。 classEmployee implements______ { ...}A.ComparableB.SerializableC.CloneableD.DataInput
考题
你在 Certkiller.com 应用程序的开发工作,Certkiller.com,让你在开发应用程序存储和检索的独特的员工人数的工作人员的信息。您已经编写下面的代码将雇员对象存储的目的。Employee e1 = new Employee (1001, "Andy Reid", "Manager"); Employee e2 = new Employee (1002, "Kara Lang", "Sales Engineer"); Dictionary eData = new Dictionary (); eData.Add (e1.ID, e1);eData.Add (e2.ID, e2);雇员的所有其他对象添加以相同的方式。您要显示在字典集合中的所有键值对。你应该做什么?()A.B.C.D.
考题
在C#中,假设Class1是一个类,而IExample是一个接口,下面的()类声明是正确的。A、class Employee:Class1,IExampleB、class Employee:IExample,Class1C、classEmployee-Class1,IExampleD、classEmployee:Class1/Iexample
考题
阅读下面Java语句 ObjectOutputStream ut=new ObjectOutputStream(new______("employee.dat"));在下画线处,应填的正确选项是A.FileB.FileWriterC.FileOutputStreamD.OutputStream
考题
在下列程序画线处填入的正确语句是()。includeusing namespace std;classBase{public:
在下列程序画线处填入的正确语句是( )。 #include <iostream> using namespace std; class Base { public: void fun() { cout<<"Base::fun",<<end1; } }; class Derived:public Base { void fun() { ______________ //显式调A.fun();B.Base.fun();C.Base::fun();D.Base->fun();
考题
阅读下面程序 public class Test2______ { public static void main(String[] args){ Thread t=new Test2(); t. start(); } public void run(){ System. out. priatln("How are you. "); } } 在程序下画线处填入的正确的选项是A.implements ThreadB.extends RunnableC.implements RunnableD.extends Thread
考题
阅读下面程序 public class Test implements Runnable{ public static void main(String[]args){ _______________________________________; t. start(); } public void mR(){ System. out. println("Hello!"); }} 在程序下画线处填入正确选项是A.Test t=flew Test()B.Thread t=new Thread();C.Thread t=new Thread(new Test());D.Test t=new Thread();
考题
下面程序中需要对Empleyee的对象进行存储,请在下画线处填入正确的选项。 class Employee implements ______ {…}A.ComparableB.SerializableC.CloneableD.DataInput
考题
在下面程序的下画线处应填入的选项是 public class Test______{ public static void main(String args[]) { Test t=new Test(); Thread tt=new Thread(t); tt.start(); } public void run() { for(int i=0;i<5;i++) System.out.println("i="+i); } }A.implements RunnableB.extends ThreadC.implements ThreadD.extends Runnable
考题
下列关于串行化说法有误的是A.在定义可串行化时,只需要声明implements Serializable子句即可B.可串行化类的数据的访问权限(public,protected,package或private),对于数据的串行化会有权限上的影响C.对于对象的串行化处理,程序员可以不编写任何方法,使用Java提供的串行化默认机制D.如果需要对对象的串行化进行更具体的控制,我们要用到定制串行化的功能
考题
下面程序中需要对Employee的对象进行存储,请在下划线处填入正确选项。 class Employee implements______ { ……}A.ComparableB.SerializableC.CloneableD.Datalnput
考题
在程序的下画线处应填入的选项是( )。 A.implements RunnableB.extends Thread
在程序的下画线处应填入的选项是( )。A.implements RunnableB.extends ThreadC.implements ThreadD.extends Runnable
考题
在程序的下画线处应填入的选项是( )。 public class Test {: public static void main(String args[]){ Test t=new Test; Thread tt=new Thread(t); tt.start; } public void run{ for(int i=0;i5;i++){ System.out.println("i="+i); } } }A.implements RunnableB.extends ThreadC.implements ThreadD.extends Runnable
考题
为使下列代码正常运行,应该在下画线处填入的选项是( )。 ObjectInputStream In= new (new FilelnputStream("employee. doc")); Employee[]newstaff=(Employee[])in.readObject ; In.close;A.ReaderB.InputStreamC.ObjectlnputD.ObjectlnputStream
考题
阅读下面程序 public class Test2 ______ { public static void main(String[] args) { Thread t=new Test2(); t.start(); } public void run() { System.out.println("How are you."); } } 程序中下画线处应填入的正确选项是A.implements ThreadB.extends RunnableC.implements RunnableD.extends Thread
考题
阅读下列Java语句: ObjectOutputStream Ut=new ObjectOutputStream(new ("employee.dat")); 在下画线处,应填的正确选项是( )。A.FileB.FileWriterC.FileOutputStreamD.Outputstream
考题
interface Data { public void load(); } abstract class Info { public abstract void load(); } Which class correctly uses the Data interface and Info class?() A、 public class Employee extends Info implements Data { public void load() { /*do something*/ } }B、 public class Employee implements Info extends Data { public void load() { /*do something*/ } }C、 public class Employee extends Info implements Data { public void load() { /*do something */ } public void Info.load() { /*do something*/ } }D、 public class Employee implements Info extends Data { public void Data.load() { /*dsomething */ } public void load() { /*do something */ } }E、 public class Employee implements Info extends Data { public void load() { /*do something */ } public void Info.load(){ /*do something*/ } }F、 public class Employee extends Info implements Data{ public void Data.load() { /*do something*/ } public void Info.load() { /*do something*/ } }
考题
在C#中,假设Person是一个类,而ITeller是一个接口,下面的()类声明是正确的。A、class Employee:Person,ITeller B、class Employee:ITeller,PersonC、class Employee-Person,ITellerD、class Employee:Person / ITeller
考题
Which two demonstrate an “is a” relationship?() A、 public interface Person { } public class Employee extends Person { }B、 public interface Shape { } public class Employee extends Shape { }C、 public interface Color { } public class Employee extends Color { }D、 public class Species { } public class Animal (private Species species;)E、 interface Component { } Class Container implements Component ( Private Component[ ]children; )
考题
单选题现有: interface Data {public void load();} abstract class Info {public abstract void load();} 下列类定义中正确使用Data和Info的是哪项?()A
public class Employee implements Info extends Data { public void load(){/*dosomething*/} }B
public class Employee extends Inf.implements Data{ public void load() {/*do something*/} }C
public class Empl.yee implements Inf extends Data{ public void Data.1oad(){* do something*/} public void load(){/*do something*/} }D
public class Employee extends Inf implements Data { public void Data.1oad() {/*do something*/) public void info.1oad(){/*do something*/} }
考题
单选题interface Data { public void load(); } abstract class Info { public abstract void load(); } Which class correctly uses the Data interface and Info class?()A
public class Employee extends Info implements Data { public void load() { /*do something*/ } }B
public class Employee implements Info extends Data { public void load() { /*do something*/ } }C
public class Employee extends Info implements Data { public void load() { /*do something */ } public void Info.load() { /*do something*/ } }D
public class Employee implements Info extends Data { public void Data.load() { /*dsomething */ } public void load() { /*do something */ } }E
public class Employee implements Info extends Data { public void load() { /*do something */ } public void Info.load(){ /*do something*/ } }F
public class Employee extends Info implements Data{ public void Data.load() { /*do something*/ } public void Info.load() { /*do something*/ } }
考题
多选题Which three demonstrate an “is a” relationship?()Apublic class X { } public class Y extends X { }Bpublic interface Shape { } public interface Rectangle extends Shape{ }Cpublic interface Color { } public class Shape { private Color color; }Dpublic interface Species { } public class Animal { private Species species; }Epublic class Person { } public class Employee { public Employee(Person person) { }Finterface Component { } class Container implements Component { private Component[] children; }
考题
多选题Which two demonstrate an “is a” relationship?()Apublic interface Person { } public class Employee extends Person { }Bpublic interface Shape { } public class Employee extends Shape { }Cpublic interface Color { } public class Employee extends Color { }Dpublic class Species { } public class Animal (private Species species;)Einterface Component { } Class Container implements Component ( Private Component[ ]children; )
考题
单选题阅读下列Java语句:ObjectOutputStream out=new ObjectOutputStream(new ______(employee.dat));在下画线处,应填的正确选项是( )。A
FileB
FileWriterC
FileOutputStreamD
OutputStream
考题
单选题为使下列代码正常运行,应该在下画线处填人的选项是( )。ObjectInputStream in = new ____(new FileInputStream(employee.dat));Employee[] newStaff = (Employee[]) in.readObject();in.close();A
ReaderB
InputStreamC
ObjectInputD
ObjectInputStream
热门标签
最新试卷