1 comments:

  1. the transient keyword is applied to only variables, if we want to not participate the variables in serialization then that variable is declared as transient .
    for example
    String userName="abcd"and
    String password="abcd"
    we declared in a class and that class is implements the Serializable interface, while we transfer the Objects through network, after we deserialize the class it shows the original value.
    suppose if we declare the password as ''transient", then after we deserialize the objects, it shouws String default value(i.e., null) that means ,
    default variable values... if int i=10, after deserialize the object it shows Zero....

    ReplyDelete