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
How do you implement tree mirroring in java?
How a variable is stored in memory?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
Is java owned by oracle?
Why javac is not recognized?
What is identifier in java?
Is null a string in java?
Is java a compiler?
What is public static void main?
Is java hard to learn?
Is java a super set of javascript?
What is complexity and its types?
do I need to use synchronized on setvalue(int)? : Java thread
According to java operator precedence, which operator is considered to be with highest precedence?
What is finally block?