Reputation:
I've seen two types of comments in eclipse. One is with green color and the other one is with blue color. What is the difference between the two? Which is used for functions and which for classes and other variables?
Upvotes: 12
Views: 8332
Reputation: 3560
// and /* .. */ are standard comments and show up in green color
/** ...... **/ are javadoc comments and show up in blue color
Docs JavaDoc
Upvotes: 2
Reputation: 7376
I guess one is normal comments (/* ... */
) while the other is javadoc (/** ... */
) do denote specific class and method documentation.
Upvotes: 1
Reputation: 11950
The green comments are the normal ones and the blue ones are JavaDoc comments
Upvotes: 1
Reputation: 25143
The two types of comments are, this:
/**
* comment goes here (notice the extra '*' in previous line)
*/
and this:
/*
* comment goes here (notice the extra '*' is not present in previous line)
*/
These two commenting style have different colors. First one gets blue color and second one gets green color.
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.
Upvotes: 15