how many ways we can serialize the java object?
Answers were Sorted based on User's Feedback
Answer / manikandansit
in two ways we can serialize java object by implementing
Serializable and Externalizable interface
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / ram
The core serialization support is in the java.io package,
and consists of two interfaces and two classes:
java.io.Serializable, java.io.Externalizable,
java.io.ObjectOutputStream, and java.io.ObjectInputStream.
Using java.io.ObjectOutputStream, you can write serialized
objects to any kind of stream: file, network, memory, etc.
Using java.io.ObjectInputStream, you can read serialized
objects from any kind of stream.
| Is This Answer Correct ? | 8 Yes | 5 No |
How to access a method that it declared as protected?
Explain covariant method overriding in java.
Is integer passed by reference in java?
What is the default value of local and global variables?
What is an infinite loop? How infinite loop is declared?
How to sort a vector elements that contains the user define class object? (Note: If Suppose consider, A Student class contain two data members. They are String studentName and int rollNo. I am creating Four objects for this class, each object contains students details like name and roll no. Now i am storing that objects in vector and if i retiving the elements from the vector means then it should be display in sorting order)
3 Answers ProdEx Technologies,
Is string pool garbage collected?
How to prevent to create multiple objects of a java class?
What is java jit compilers?
is java support call by reference and call by value, if supports please explain?
Is there is any error if you have multiple main methods in the same class?
In C we use only compiler. Why java uses both compiler and interpreter? What is its significance?