© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu

Home Placements Interview Questions Java Interview Questions And Answers Java Interview Questions On Input and Output Stream ▼

Java Interview Questions On Input and Output Stream

7. What is the difference between the File and RandomAccessFile classes?

Answer
The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.

8. What interface must an object implement before it can be written to a stream as an object?

Answer
An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.

9. What is Serialization and deserialization?

Answer
Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.

10. What is the purpose of the File class?

Answer
The File class is used to create objects that provide access to the files and directories of a local file system.

Previous End
1 2
SLogix Student Projects
bottom