Instantiate object from a Class which contains private constructor

We know that we cannot make any object if the Class contains private constructor but this is not true until a special care is not taken to the private constructor. This tutorial shows an example how to create instance using Reflection even if the classes have private constructors. Though if Continue Reading…

Externalization example in Java

The Externalizable interface provides the necessary means for implementing a custom serialization mechanism. Implementing the Externalizable interface means that we must override writeExternal and readExternal methods. These methods will be called when you serialize or deserialize a particular instance. The difference between Serialization and Externalization is that when we implement Continue Reading…