In Singeton classes only one instance will be created. We are going to serialize the class. This can be done very easily. What we need to do is to implement a java.io.Serializable interface. We will use a method of Serializable interface that is readResolve().
readResolve(): It returns Object and throw ObjectStreamException
Code of the program is given below:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: June 7, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles