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

题目内容 (请给出正确答案)
单选题
现自:  class Car implements Serializable  ()      class Ford extends Car  {}  如果试图序列化一个Ford实例,结果为()
A

编译失败

B

两个对象被序列化

C

—个对象被序列化

D

运行时异常被抛出


参考答案

参考解析
解析: 暂无解析
更多 “单选题现自:  class Car implements Serializable  ()      class Ford extends Car  {}  如果试图序列化一个Ford实例,结果为()A 编译失败B 两个对象被序列化C —个对象被序列化D 运行时异常被抛出” 相关考题
考题 classCarimplementsSerializable{}classFordextendsCar{}如果试图序列化一个Ford实例,结果为() A.编译失败B.一个对象被序列化C.两个对象被序列化D.运行时异常被抛出

考题 现有:classPetimplementsSerializable{Collarc=newCollar();}classCollarimplementsSerializable{collarPartcpl=newCollarPart(handle);CollarPartcp2=newCollarPart(clip);}classCollarPartimplementsSerializable()如果Pet实例被序列化,则多少对象将被序列化?()A.0B.1C.2D.3E.4F.5

考题 现自:classCarimplementsSerializable()classFordextendsCar{}如果试图序列化一个Ford实例,结果为() A.编译失败B.两个对象被序列化C.—个对象被序列化D.运行时异常被抛出

考题 现有两个类A,B,以下描述中表示B继承自A的是 ( )A.class A extends BB.class B implements AC.class A implements BD.class B extends A

考题 现自:  class Car implements Serializable  ()      class Ford extends Car  {}  如果试图序列化一个Ford实例,结果为()  A、编译失败B、两个对象被序列化C、—个对象被序列化D、运行时异常被抛出

考题 现有:   class Parser extends Utils {   public static void main(String [] args) {     System.out.print(new Parser().getInt("42"));    }   int getInt(String arg) {  return Integer.parseInt(arg);  }    }   class Utils {     int getInt(String arg) throws Exception { return 42; }    }    结果为()  A、 42B、 编译失败。C、 无输出结果。D、 运行时异常被抛出。

考题 class Guy{String greet(){return “hi“}}   class Cowboy extends Guy {String greet(){return“howdy”}}   class Surfer extends Guy {String greet(){return“dudel”}}  class Greetings{   public static void main (string[]args){   Guy[] guy= {new Guy(),new Cowboy(),new Surfer()};   for(Guy 0: guys)   System.out.print(g.green());  }   }   结果为:  A、运行时异常被输出B、第7行出现一个错误,编译失败C、第8行出现一个错误,编译失败D、hi hi hiE、hi hawdy doude

考题 关于对象的序列化说法错误的是()。A、 实现序列化的对象必须实现Serializable接口B、 实现序列化的对象必须自定义序列号C、 ObjectOutputStream中的writeObject()方法可以将对象写出D、 ObjectInputStream中的readObject()方法可以读取对象

考题 现自:  1.  interface Color {  }      2. interface Weight  {  }      3.  //insert code here    和以下足六个声明:  class Boat extends Color, extends Weight  {  }     class Boat extends Color and Weight  {  }      class Boat extends Color, Weight  {  }  class Boat implements Color,  implements Weight  {  }     class Boat implements Color and Weight  {  }      class Boat implements Color, Weight  {  }    分别插入到第3行,有多少行可以编译? () A、  0B、  1C、  2D、  3

考题 现有:  class Guy {String greet()    {return "hi";  }  }  class Cowboy extends Guy  (  String greet()    (  return "howdy  ¨;    )  )  class Surfer extends Guy  (String greet()    (return "dude! ";)) class Greetings  {  public static void main (String  []  args)    {  Guy  []  guys =  ( new Guy(), new Cowboy(), new Surfer()  );  for (Guy g:  guys) System.out.print (g.greet()};  }  }  结果为:() A、 hi howdy dude!B、运行时异常被抛出。C、第7行出现一个错误,编译失败。D、第8行出现一个错误,编译失败。

考题 class Car implements Serializable { }   class Ford extends Car { }   如果试图序列化一个Ford实例,结果为()  A、编译失败B、一个对象被序列化C、两个对象被序列化D、运行时异常被抛出

考题 现有:  class Pet implements Serializable  {      Collar c= new Collar();      }  class Collar implements Serializable  {      collarPart cpl=new CollarPart ("handle");      CollarPart cp2=new CollarPart ("clip");      }     class CollarPart implements Serializable()  如果Pet实例被序列化,则多少对象将被序列化?()    A、0B、1C、2D、3E、4F、5

考题 现有:  class ThreadBoth extends Threaa implements Runnable  {      public void run()  (System.out.print("hi");  }     public static voicl main (String  []  args)  {     Thread tl=new ThreadBoth():      Thread t2 = new Thread (tl):     tl.run():      t2.run():     }          结果为:()      A、 hi hiB、 hiC、编译失败D、运行时异常被抛出

考题 class Parser extends Utils {  public static void main(String [] args) {   System.out.print(new Parser().getInt("42"));  }  int getInt(String arg) {  return Integer.parseInt(arg);  }  }  class Utils {  int getInt(String arg) throws Exception { return 42; }  }  结果为:() A、42B、编译失败C、无输出结果D、运行时异常被抛出

考题 你正在定义个一叫做Certkiller的类,这个类包含如下内容. Certkiller类包含一个可以再对象上执行的叫做ProcessChildren的方法。 Cerkiller类的对象可以被序列化()A、Apply the OnDeserializing attribute to the ProcessChildren method.B、Specify that Certkiller Class implements the IDeserializationCallback interface.C、Specify that Certkiller Class inherits from the ObjectManager class.D、Apply the OnSerialized attribute to the ProcessChildren method.E、Create a GetObjectData method that calls ProcessChildren.F、Create an OnDeserialization method that calls ProcessChildren.

考题 如果你被要求写一段代码读取一个序列化的对象,那么一般使用哪种Stream()A、FileInputStreamB、FileReaderC、DataInputStreamD、ObjectInputStream

考题 单选题您最近创建了一个名为车辆的可序列化的类。 类如下所示: [Serializable] public class Vehicle { public string VIN; public string Make; private string Model; private int Year; private string Owner; } Certkiller.com 不想要序列化一个车辆对象,出于安全原因时永久保存的所有者字段。 您需要确保实现这一目标。 你应该做什么?()A 适用于所有者字段的 OptionalField 属性。B 应用,所以所有者字段的属性。C 已实现 IFormatter 接口的自定义序列化的车辆类别。D 做什么,因为在使用二进制序列化时,私营领域是永远不会保留。

考题 单选题现有:   class Parser extends Utils {   public static void main(String [] args) {     System.out.print(new Parser().getInt("42"));    }   int getInt(String arg) {  return Integer.parseInt(arg);  }    }   class Utils {     int getInt(String arg) throws Exception { return 42; }    }    结果为()A  42B  编译失败。C  无输出结果。D  运行时异常被抛出。

考题 单选题class Guy{String greet(){return “hi“}}   class Cowboy extends Guy {String greet(){return“howdy”}}   class Surfer extends Guy {String greet(){return“dudel”}}  class Greetings{   public static void main (string[]args){   Guy[] guy= {new Guy(),new Cowboy(),new Surfer()};   for(Guy 0: guys)   System.out.print(g.green());  }   }   结果为:A 运行时异常被输出B 第7行出现一个错误,编译失败C 第8行出现一个错误,编译失败D hi hi hiE hi hawdy doude

考题 单选题关于对象的序列化说法错误的是()。A  实现序列化的对象必须实现Serializable接口B  实现序列化的对象必须自定义序列号C  ObjectOutputStream中的writeObject()方法可以将对象写出D  ObjectInputStream中的readObject()方法可以读取对象

考题 单选题现有:  class ThreadBoth extends Threaa implements Runnable  {      public void run()  (System.out.print("hi");  }     public static voicl main (String  []  args)  {     Thread tl=new ThreadBoth():      Thread t2 = new Thread (tl):     tl.run():      t2.run():     }          结果为:()A  hi hiB  hiC 编译失败D 运行时异常被抛出

考题 多选题你正在定义个一叫做Certkiller的类,这个类包含如下内容. Certkiller类包含一个可以再对象上执行的叫做ProcessChildren的方法。 Cerkiller类的对象可以被序列化()AApply the OnDeserializing attribute to the ProcessChildren method.BSpecify that Certkiller Class implements the IDeserializationCallback interface.CSpecify that Certkiller Class inherits from the ObjectManager class.DApply the OnSerialized attribute to the ProcessChildren method.ECreate a GetObjectData method that calls ProcessChildren.FCreate an OnDeserialization method that calls ProcessChildren.

考题 单选题class Car implements Serializable { }   class Ford extends Car { }   如果试图序列化一个Ford实例,结果为()A 编译失败B 一个对象被序列化C 两个对象被序列化D 运行时异常被抛出

考题 单选题现自:  1.  interface Color {  }      2. interface Weight  {  }      3.  //insert code here    和以下足六个声明:  class Boat extends Color, extends Weight  {  }     class Boat extends Color and Weight  {  }      class Boat extends Color, Weight  {  }  class Boat implements Color,  implements Weight  {  }     class Boat implements Color and Weight  {  }      class Boat implements Color, Weight  {  }    分别插入到第3行,有多少行可以编译? ()A   0B   1C   2D   3

考题 单选题如果你被要求写一段代码读取一个序列化的对象,那么一般使用哪种Stream()A FileInputStreamB FileReaderC DataInputStreamD ObjectInputStream

考题 单选题现有:  class Guy {String greet()    {return "hi";  }  }  class Cowboy extends Guy  (  String greet()    (  return "howdy  ¨;    )  )  class Surfer extends Guy  (String greet()    (return "dude! ";)) class Greetings  {  public static void main (String  []  args)    {  Guy  []  guys =  ( new Guy(), new Cowboy(), new Surfer()  );  for (Guy g:  guys) System.out.print (g.greet()};  }  }  结果为:()A  hi howdy dude!B 运行时异常被抛出。C 第7行出现一个错误,编译失败。D 第8行出现一个错误,编译失败。

考题 单选题现自:  class Car implements Serializable  ()      class Ford extends Car  {}  如果试图序列化一个Ford实例,结果为()A 编译失败B 两个对象被序列化C —个对象被序列化D 运行时异常被抛出

考题 单选题现有:  class Pet implements Serializable  {      Collar c= new Collar();      }  class Collar implements Serializable  {      collarPart cpl=new CollarPart ("handle");      CollarPart cp2=new CollarPart ("clip");      }     class CollarPart implements Serializable()  如果Pet实例被序列化,则多少对象将被序列化?()A 0B 1C 2D 3E 4F 5