---
title: "What is  the use of transient keyword in java"  
description: "What is  the use of transient keyword in java"  
author: "Mark Devid"  
published: 2015-02-27  
updated: 2015-02-27  
canonical: https://www.mindstick.com/forum/12990/what-is-the-use-of-transient-keyword-in-java  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is  the use of transient keyword in java

What is the use of [transient keyword](https://www.mindstick.com/interview/22817/what-is-the-use-of-transient-keyword-in-java) in [java](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) ?

## Replies

### Reply by Anonymous User

· [transient](https://www.mindstick.com/interview/1086/what-are-transient-and-volatile-modifiers) [keyword](https://www.mindstick.com/forum/33572/sql-inner-join-keyword) is used when we are Serializing an object.

· The keyword transient in Java used to indicate that the variable should not be serialized By default all the variables in the object is converted to persistent state.

· In some cases, you may want to avoid persisting some variables because you don’t have the necessity to transfer across the network. So, you can declare those variables as transient.

· If the variable is declared as transient, then it will not be persisted. It is the main purpose of the transient keyword.


---

Original Source: https://www.mindstick.com/forum/12990/what-is-the-use-of-transient-keyword-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
