Explain the use of Externalization interface.Externalization is same as serialization. It extends Serializable interface. To externalize your object, you need to implement Externalizable interface that extends Serializable interface. It is mostly used when you need to add data to the serialization stream that are not the serialized object data members (from external source).Every class that uses/implements externalization must implement Externalizable interface and override methods : -writeExternal-readExternal-and must have a constructor that takes no arguments. One thing you can do with Externalization is that you can store extra information into object like STATIC variables and transient variables or you can add more information if you have any business need.
|
Java featuresJava features - Simple, Object-Oriented, Robust, Distributed, Portable, Interpreted, Multithreaded, Platform Independent, Secure...