In this tutorial, we will discuss The transient keyword in Java language
In the Java programming language, the transient keyword is used with instance variable to avoid them from serialization process.
if you define any data member as transient, it will not be serialized.
Transient is an access modifier denoted the JVM to skip the particular variable or object when serializing an object /instance of the class
The transient keyword cannot be used static keyword in Java because the static variable cannot be changed.
The transient keyword can only use an instance variable
Declaration
Syntax
private transient <member-variable>; or transient private <member-variable>;
Example
transient int age; transient String name;
There are other Java language keywords that are similar to this keyword
There are other Java language keywords that are similar to this keyword
Usage of this statement in the Java language
How to find reverse number using method In this article, we will discuss the concept…
C# inverted full pyramid star pattern In this article, we will discuss the concept of…
C# Full Pyramid star pattern program In this article, we will discuss the concept of…
Program to count vowels, consonants, words, characters and space in Java In this article, we…
How to print multiplication table using Array in C++ language In this post, we will…
C Program to multiplication table using Array In this tutorial , we will discuss about…