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 are the differences between checked exception and unchecked exception?
What is difference between hashset and hashmap in java?
What is string variable?
How do you check if a string is lexicographically in java?
What is stringreader?
What is regex in java?
What is variable and example?
How do you sing an Applet ?
What is data and its types?
How will you get the platform dependent values like line separator, path separator, etc., ?
Is list thread safe in java?
What is jit and its use?
What is boolean used for?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
Explain the advantages of packages in java?