- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
transient Keyword in Java
An instance variable is marked transient to indicate the JVM to skip the particular variable when serializing the object containing it. This modifier is included in the statement that creates the variable, preceding the class or data type of the variable.
Example
public transient int limit = 55; // will not persist public int b; // will persist
- Related Articles
- What are Transient variables in Java? Explain.
- Difference between volatile and transient in java
- How transient works with final in Java serialization?
- What does the modifier transient in Java do?
- Why the transient variable is not serialized in Java?
- What is the difference between transient and volatile in Java?
- instanceof Keyword in Java
- Private Keyword in Java
- Protected Keyword in Java
- Public Keyword in Java
- static Keyword in Java
- synchronized Keyword in Java
- volatile Keyword in Java
- super keyword in Java
- final keyword in Java

Advertisements