Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java T transient Java Keyword

Related Tutorials


 
 

Share on Google+Share on Google+

transient Java Keyword

Advertisement
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;
}
 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  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.

Posted on: May 25, 2009

Related Tutorials

Discuss: transient Java Keyword   View All Comments

Post your Comment


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

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

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?
Naresh
September 26, 2012
FileInputStream obj is not initializing

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

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