How to serialize variables selectively

In a Java class, one has 10 variables. One wants to serialize only 3 variables,how can this be achieved?
->Make variables as 'transient' which are not to be serialized.

No comments :

Post a Comment

Your Comment and Question will help to make this blog better...