I have a Person object with 5 variables and I want to store
them in a file called Person.txt. What should I do?

Answer Posted / puneet

outpurstreamobject.writeobject(object o);
flush//;
close//;

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the major drawback of internal iteration over external iteration?

820


What is difference between path and classpath in java?

728


Which is better 64 bit or 32 bit?

717


Is 9 a prime number?

671


Is string is a data type?

767


What is a void in java?

812


Do you know why doesn't the java library use a randomized version of quicksort?

764


What is the use of math abs in java?

770


Should a main method be compulsorily declared in all java classes?

834


What is a java developer salary?

763


Discuss 2D arrays.

841


How can you avoid serialization in child class if the base class is implementing the serializable interface?

873


Can you call one constructor from another if a class has multiple constructors?

814


How will you get the platform dependent values like line separator, path separator, etc., ?

813


What is static import in java?

760