- transient is the modifier applicable only for the variable.
- We can use the transient keyword in serialization context.
- At the time of serialization if we don't want to save the value of a particular variable to meet security constraint then we should declare that variable as transient.
- At the time of serialization, JVM ignores the original value of the transient variable and save default value to the file.
- Hence "transient means not to serialize".
Pages
- Home
- About
- 1.Java - Language Fundamental
- 2.Java - Operator & Assignments
- 3.Java - Flow Control
- 4.Java - Access Modifiers
- 5.Java - OOPs Concept
- 6.Java - Exception Handling
- 7.Java - Multithreading
- 8.Java - Garbage Collection
- 9.Java - java.lang Package
- 10.Java - java.io package
- 11.Java - Collection Framework
- 12.Java - Enum
- 13.Java - Generics
- 14.Java - Assertions
- Java Programming Questions
- Today's Laptops & Mobiles Hot Deals
- Install java(jdk) & Set path & Run program
Flipkart add sale
Java- transient modifier / Chapter -9 / Access Modifier
Subscribe to:
Post Comments (Atom)
© Copyright 2017 Javabychetan.blogspot.com |
No comments:
Post a Comment
Be the first to comment!
Don't just read and walk away, Your Feedback Is Always Appreciated. I will try to reply to your queries as soon as time allows.
Note:
1. If your question is unrelated to this article, please use our Facebook Page.
2. Please always make use of your name in the comment box instead of anonymous so that i can respond to you through your name and don't make use of Names such as "Admin" or "ADMIN" if you want your Comment to be published.
Regards,
JavaByChetan
Back To Home