日食中绿色和蓝色注释之间的区别 [英] Difference between green and blue comments in eclipse

查看:63
本文介绍了日食中绿色和蓝色注释之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在日食中看到了两种类型的注释.一种是绿色,另一种是蓝色.两者有什么区别?哪个用于函数,哪个用于类和其他变量?

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?

推荐答案

两种类型的注释是:

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

和这个:

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

第一种样式是Javadoc注释,可用于生成各种文档格式.Eclipse将使用这些工具为记录的项目生成工具提示和自动完成的文档.

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.

有关详细信息,请参阅文档.

这篇关于日食中绿色和蓝色注释之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆