user1611545
user1611545

Reputation:

Difference between green and blue comments in eclipse

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

Answers (4)

thar45
thar45

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

cadrian
cadrian

Reputation: 7376

I guess one is normal comments (/* ... */) while the other is javadoc (/** ... */) do denote specific class and method documentation.

Upvotes: 1

Sri Harsha Chilakapati
Sri Harsha Chilakapati

Reputation: 11950

The green comments are the normal ones and the blue ones are JavaDoc comments

Upvotes: 1

Jainendra
Jainendra

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

Related Questions