---
title: "What are Transient and Volatile Modifiers?"  
description: "What are Transient and Volatile Modifiers?"  
author: "James Smith"  
published: 2011-07-15  
updated: 2020-09-16  
canonical: https://www.mindstick.com/interview/1086/what-are-transient-and-volatile-modifiers  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What are Transient and Volatile Modifiers?

Transient: The transient modifier applies to variables only and it is not stored as part of its object’s Persistent state. Transient variables are not serialized. Volatile: Volatile modifier applies to variables only and it tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program.

## Answers

### Answer by James Smith

Transient: The transient modifier applies to variables only and it is not stored as part of its object’s Persistent state. Transient variables are not serialized. Volatile: Volatile modifier applies to variables only and it tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program.


---

Original Source: https://www.mindstick.com/interview/1086/what-are-transient-and-volatile-modifiers

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
