Only the object in question is being serialized--the return values of methods, or objects used inside methods, have nothing to do with it.
Joined: Oct 13, 2005
You will have to check in the Java Language Specification, but I think it is only the instance fields which have to be serializable. It is not a case of primitive, String or Serializable. A String is a Serializable. So is an array (provided its elements are Serlalizable). You can check any class in the API because it will say "implements Serializable" near the top of the page for that class.