Share on Google+Share on Google+

transient Java Keyword

The transient is a keyword defined in the java programming language.

transient Java Keyword


The transient is a keyword defined in the java programming language. Keywords are basically reserved words which have specific meaning relevant to a compiler in java programming language likewise the transient keyword indicates the following :

-- The transient keyword is applicable to the member variables of a class.
-- The transient keyword is used to indicate that the member variable should not be serialized when the class instance containing that transient variable  is needed to be serialized.

Example to use the transient keyword with a variable:

public class Class1{

private transient String password;



Posted on: May 25, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: transient Java Keyword   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
November 28, 2011
transient keyword

The solution provided is not clear plz use gud examples to explain.
December 8, 2011

u did a great job.. Keep up ur good work....
Ananda Padmanaban G
June 21, 2012
Need Explanation

Can yo give me some detailed explanation?
September 26, 2012
FileInputStream obj is not initializing

import*; class files { public static void main(String args[]) { try { BufferedReader br = new BufferedReader(new FileInputStream("")); String line=null; while((line=br.readLine())!=null) { System.out.println(line); } br.close(); } catch(Exception e) { System.out.println("file not exist"); } } }
October 13, 2012

iam not getting detailed information about transient key word.if any body known that pls send me answer with example