Java - Comments

Comments

// single-line
/* multi-line */
/** Javadoc: appears in API docs */

Use Javadoc on public APIs to document behavior, parameters, and return types.

Try it

  1. Add Javadoc to a simple utility method and view the tooltip in your IDE.
  2. Use inline comments to explain a tricky line; then remove them and see if the code is still readable.