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
When throw keyword is used?
What is passed by reference and pass by value ?
What is the exact difference in between unicast and multicast object? Where we will use?
Why is inheritance used in java?
How to avoid memory leak in java?
Why java is platform independent? Explain.
What is listnode in java?
How to perform linear search in java?
If you do not want your class to be inherited by any other class. What would you do?
What is a prefix function.write down a code to compute prefix function.
What java is used for?
what is the use of bean managed and container managed with example?
How to add menushortcut to menu item?
What is a buffer in java?
Is there any tag in htm to upload and download files?