Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Question about comment line in java(eclipse)

What is the difference between this

/**
 * comment goes here (notice the extra '*' in previous line)
 */

and this?

/*
 * comment goes here (notice the extra '*' is not present in previous line)
 */

Because I've noticed that in eclipse these two commenting style have different colors. Firsts one gets blue color and second one gets green color.

Is there any difference between these two commenting styles?

like image 683
Abhishek Avatar asked Dec 06 '22 22:12

Abhishek


1 Answers

The first style is a Javadoc comment, which can be used to generate various documentation formats. Eclipse will use these to generate tooltips and autocomplete documentation for the documented item.

For more detail see the documentation.

like image 172
Adrian Cox Avatar answered Dec 09 '22 10:12

Adrian Cox