Skip to content
Advertisement

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 /** */ ?

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement