Hi Hariom,
Use the transient keyword to declare instance variables that can’t be saved, and shouldn’t be transmitted as part of the view state for a Visualforce page.
For example- Transient Integer currentTotal;
You can also use the transient keyword in Apex classes that are serializable, namely in controllers, controller extensions, or classes that implement the Batchable or Schedulable interface. In addition, you can use transient in classes that define the types of fields declared in the serializable classes. – Salesforce