Javadoc comments vs block comments?

Info that the user of a class needs to know should go into a Javadoc comment.

Info that a developer modifying a class needs to know go into a normal comment (block or line).

And it’s very possible that any block of code (class, interface, field, method, constructor, …) can have both a Javadoc comment and a normal comment block, when both publicly visible as well as internal documentaton is required.

Personally I tend towards writing very little non-Javadoc comments, because I prefer to structure my code in a way that it’s self-documenting.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)