Các câu hỏi phỏng vấn và câu trả lời về phần về I/O và Serialization
Serialization is a process of writing the state of an object into a byte stream.It is mainly used to travel object's state on the network.
Deserialization is the process of reconstructing the object from the serialized state.It is the reverse operation of serialization.
If you define any data member as transient,it will not be serialized.more details...
Externalizable interface is used to write the state of an object into a byte stream in compressed format.It is not a marker interface.
Serializable is a marker interface but Externalizable is not a marker interface.When you use Serializable interface, your class is serialized automatically by default. But you can override writeObject() and readObject() two methods to control more complex object serailization process. When you use Externalizable interface, you have a complete control over your class's serialization process.
Sưu tầm: Nguyễn Thị Bảo Trang
» Tin mới nhất:
» Các tin khác: