什么是java中调用的文档字符串?

ttt*_*ppp 15 java documentation-generation nomenclature

在Java方法之前,我们有类似的东西:

/**
 * Takes a number and returns its square root.
 * @param x The value to square.
 * @return The square root of the given number.
 */
public float getSqrt(float x) {
...
}
Run Code Online (Sandbox Code Playgroud)

这是否有名称(如Python中的docstrings)?

Buh*_*ndi 16

实际上,它们被称为文档注释,javadoc是一种将这些注释生成为HTML的工具.

您可以在Wikipedia中找到Javadoc注释的结构(例如).


Rid*_*del 6

是的,它被称为javadoc.

  • 不,javadoc是处理它们的工具.它们被称为doc评论. (3认同)