transient is used to indicate that a class field doesn't need to be serialized. Probably the best example is a Thread field. There's usually no reason to serialize a Thread, as its state is very 'flow specific'.
Why we need transient keyword to prevent serialization of a particular data member. we can also make it static because static data member can not be serialized.