how a marker interface gets its functionality and when we
implements a marker interface how it got invoked

Answer Posted / yadav

Serializability of a class is enabled by the class implementing the java.io.Serializable interface. Classes that do not implement this interface will not have any of their state serialized or deserialized. All subtypes of a serializable class are themselves serializable. The serialization interface has no methods or fields and serves only to identify the semantics of being serializable.

Classes that require special handling during the serialization and deserialization process must implement special methods with these exact signatures:

private void writeObject(java.io.ObjectOutputStream out)
throws IOException
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When throw keyword is used?

594


What is passed by reference and pass by value ?

586


What is the exact difference in between unicast and multicast object? Where we will use?

563


Why is inheritance used in java?

611


How to avoid memory leak in java?

600






Why java is platform independent? Explain.

603


What is listnode in java?

537


How to perform linear search in java?

569


If you do not want your class to be inherited by any other class. What would you do?

565


What is a prefix function.write down a code to compute prefix function.

542


What java is used for?

664


what is the use of bean managed and container managed with example?

1503


How to add menushortcut to menu item?

567


What is a buffer in java?

577


Is there any tag in htm to upload and download files?

612