Buscar

How is an object serialized in Java? To convert an object into byte stream by serialization in Java, a class must implement the Serializable inter...

How is an object serialized in Java?

To convert an object into byte stream by serialization in Java, a class must implement the Serializable interface.
All objects of a class implementing the Serializable interface get serialized and their state is saved in byte stream.
a) Only statement 1 is true.
b) Only statement 2 is true.
c) Both statements are true.
d) Both statements are false.

Essa pergunta também está no material:

23 pág.

Linguagem de Programação Java Universidade PaulistaUniversidade Paulista

💡 1 Resposta

User badge image

Ed Verified user icon

To serialize an object in Java, a class must implement the Serializable interface. When an object is serialized, its state is converted into a byte stream, which can be saved or transmitted. In the given question, both statements are true. So the correct answer is option c) Both statements are true.

0
Dislike0

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais