Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transient Modifier

 
Adrienne Jeyapriya
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm a software professional..working in mainframes.
got interested in Java and i'm in the learning process.
I would like to know what Transient Modifier is..in simple terms.
regards
Priya
 
Vim Win
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi priya,
Transient modifier is use for Serialization purposes. (If you dont get what is serialization, donot puzzle). When you want to write an object to a storage and retrieve back, you need to implement a interface called serializable. This will make your object to be written to the storage properly and retrieved back in the same way.
In some cases, some variables or data members of your object should not be written to storage. For example, password details to be entered everytime. In this case, you declare the member to be off type Transient. This will make the serialiasation proper. i.e. Except those members all others are written to the storage and while reading back only those that were written are only read.
I hope the modifier is clear to you now.
Bye.
JVRN.

Originally posted by Adrienne Jeyapriya:
Hi,
I'm a software professional..working in mainframes.
got interested in Java and i'm in the learning process.
I would like to know what Transient Modifier is..in simple terms.
regards
Priya

 
paul wheaton
Trailboss
Pie
Posts: 21752
Firefox Browser IntelliJ IDE Java
 
Adrienne Jeyapriya
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks vijay...
that helped me a lot
priya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic