Duvida sobre Serializable

1 resposta
P

Olá pessoal ,

não entendi o que está querendo com essa pergunta referente a deserializable da classe Ford ?

If you attempt to deserialize a properly serialized instance of Ford, what is the result?

Alguém pode me ajudar agradeceria ?

abs

11. class Ford extends Car implements Serializable { 
12.   Ford() { System.out.print("new Ford "); }
13. }
14.
15. class Car {
16.   Car() { System.out.print("new Car "); }
17. }

If you attempt to deserialize a properly serialized instance of Ford, what is the result?


A ()new Car 
B ()new Ford 
C ()new Car new Ford 
D ()new Ford new Car 
E ()Compilation fails. 
F () An exception is thrown at runtime.

1 Resposta

B

Ola,

Isto dá erro de runtime… opção “F”, devido a classe Car não ser Srializable, entçao ela nem é serializavel…

Criado 24 de abril de 2006
Ultima resposta 24 de abr. de 2006
Respostas 1
Participantes 2