transient keyword in java

The “transient” keyword can be applied to member variables of a class to indicate that the member variable should not be serialized when the containing class instance is serialized. So transient fields will not be persisted when the object is serialized. 1 2 3 4 5 6 class InterestExample{     int principle;     […]

Share this article on