When i define a java object to implement serializable interface, do the members of the object, also become serializable? Or i have to go as far along the nesting depth, to redefine every object along the path as serializable?
Well, implementing Serializable will give you serialization support only if all non-transient members (thanks, danben) are either primitives or serializable classes themselves.
So yes, if you have a lot of different things as members that are not serializable, then you have to make them serializable too.
Unless they are not important for representing your object's state. If you can re-create it without them, then you can always make the members transient to omit them from serialization.
Most classes that you use regularly in java are serializable (Collections, String, decedents of Number, etc.), however any classes that you reference either have to be serializable or declared transient. Of course, if they are transient, they won't be referenced when the class is deserialized.
The members are not automatically made Serializable.
If you have members that you have in your class and which you wrote yourself, you have to go to each and make them serializable (by implementing the interface).
Most of the types that come with JAVA libraries are already serializable, so that shouldn't bother you.
And ofcourse, this applies to all members recursively.
In other words - If there is a piece of data or value that needs to be transferred or saved, at any depth within an object, it has to be Serializable.