76 805
Assignments Done
Successfully Done
In June 2019

Answer to Question #20635 in Java | JSP | JSF for nohra

Question #20635
To read objects from a file, we use the class _________________ .
A) InputObjectStream
B) ObjectInputStream
C) ObjectStream
D) ObjectInput
Expert's answer
To read objects from a file, we use the classObjectInputStream.

For example:
//this method reads object, that had been written to thefile //you should to know what type of object you will read.
//It necessary for casting read object to your typepublic Object read(File file) throwsException
FileInputStreamfis = new FileInputStream(file);
ObjectInputStreamoin = new ObjectInputStream(fis);
return (Object)oin.readObject();

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions