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 the constructor?
What is the difference between conversation & casting?
What is method overloading in JAVA? Why is it not present in C ?
Is it possible to override the main method?
What are the wrapped, classes?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
Write a program to print all permutations of string?
What is the use of bufferedreader?
How would you convert bytes to string?
How can we pass argument to a function by reference instead of pass by value?
How to find the index of the largest number in an arraylist java?
How to obtain a performance profile of java program
Can we clone singleton object?
What are the basic concepts of OOPS in java?
What is the static keyword?