can you please explain the output of the above program
the output of the program is:
Before Serialization n1=10
Before Serialization n2=20
After Serialization n1=10
After Serialization n2=20
in the above program i have declared static int n1 instead of static if i will use transient int n1 then after serialization n1=0 and n2=20
but i have read that static and transient variables can not be serialized then in case of transient default value according to the data-type is printing but it is not in the case of static
please help me out from this situation