A transient variable would not be serialized even if the class to which it belongs is serialized.
Sample class which has transient variable is shown below:Transitent variable
12345678 | public class Paper implements Serializable { Â Â Â Â private int id; Â Â Â Â private String title; Â Â Â Â private String author; Â Â Â Â private transient int version = 1 ; Â Â Â Â } |