Inline Code Documentation

suggest change

Apart from the Javadoc documentation code can be documented inline.

Single Line comments are started by // and may be positioned after a statement on the same line, but not before.

public void method() {
  //single line comment
  someMethodCall(); //single line comment after statement

Multi-Line comments are defined between /* and */. They can span multiple lines and may even been positioned between statements.

public void method(Object object) {

JavaDocs are a special form of multi-line comments, starting with /**.

As too many inline comments may decrease readability of code, they should be used sparsely in case the code isn’t self-explanatory enough or the design decision isn’t obvious.

An additional use case for single-line comments is the use of TAGs, which are short, convention driven keywords. Some development environments recognize certain conventions for such single-comments. Common examples are

Or issue references, i.e. for Jira

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents