Purpose of transient keyword

transient keyword is used in serialization. A data member(of a class implementing Serializable interface) can be declared as transient, if it need not be serialized. Hence the data members declared as transient does not under go serialization.

For complete example, please read Java Serialization