I have a Person object with 5 variables and I want to store
them in a file called Person.txt. What should I do?
Answers were Sorted based on User's Feedback
Answer / srinu
we have imlpement ur class with java.lang.Serializible
interface and used the following steps
1)ObjectOutPutStream class(one method is their write objects
into file)
(a)writeObject(Object obj) -------> writing for objects
into file.This process is called Serializtion.
2)ObjectInputStream class reading the objects from file
(a)readObject(Object obj)---------> Reading objects from
fole This process is called Deserialization.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / puneet
outpurstreamobject.writeobject(object o);
flush//;
close//;
Is This Answer Correct ? | 0 Yes | 2 No |
Is integer a class?
How can I become a good programmer?
Is passing by reference faster?
Can variables be used in java without initialization?
Explain what are final variable in java?
class test { private static void main(String []adsf) { } } explain me that the above code is error or exception
what is jdk1.5 features?
What is the java idl system?
a thread is runnable, how does that work? : Java thread
Which is easier .net or java?
Wha is the output from system.out.println(“hello”+null); ?
What is the nested interface?