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
Explain about object oriented programming and its features?
What is linked hashset and its features?
What is the disadvantage of java?
What is private static in java?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?
What is the meaning of variable in research?
When arithmeticexception is thrown?
What is the loop in java?
Is it safe to install java on my computer?
when to use ArrayList and when to use HashMap in webApplication.
Can we use this () and super () in a method?
Explain about strings in java?
What is the purpose of sizeof operator?
What is try-with-resources in java?
What is generic class?