Should I document my private methods?

Viewed 14096

Private methods documentation can only be seen by who has access to the source code. Is it worth the effort spent on it?

21 Answers

What about private fields? For a Serializable class private fields must be documented. From "Effective Java" by Johsua Bloch:

Private fields define a public API, which is the serialized form of the class, and this public API must be documented. The presence of the @serial tag tells the Javadoc utility to place this documentation on a special page that documents serialized forms

Related