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
What is a key in java?
Why main function is static?
How do you sort objects in java?
what is anonymous class in java?
Can I import same package/class twice?
What is the difference between a method and a function in alice?
what is use of functional interface in java 8?
How do you create a bulleted list?
What is the default execution method in java?
What are parameters in a method?
What does you mean in math?
What are the java ide's? Explain
Can we define private and protected modifiers for variables in interfaces?
Explain what is encapsulation?
How many bits is a char?