Search code examples
javaeclipsecommentsjavadoc

Inline comments in Java: /** opposed to /*?


is there a reason i should prefer to write inline-comments in java like this:

/** Init operation */
mindControlLaser.engage();

as opposed to use just one *:

/* i'm a happy comment */

Eclipse colours the syntax differently, but is there really anything in the "toolchain" (javadoc, eclipse, etc.) giving me an advantage when using /** */ ?


Solution

  • No reason for inline comments.

    /** signals to javadoc utility to extract documentation about your API automatically. It does not have any effect when is used inside methods.