Example program to demonstrate deserialization of object state in Java