Check out example codes for "transient keyword in java". It will help you in understanding the concepts better.

Code Example 1

// A sample class that uses transient keyword to 
// skip their serialization. 
class Test implements Serializable 
{ 
    // Making password transient for security 
    private transient String password; 
  
    // Making age transient as age is auto- 
    // computable from DOB and current date. 
    transient int age; 
  
    // serialize other fields 
    private String username, email; 
    Date dob; 
  
    // other code 
}

Learn ReactJs, React Native from akashmittal.com