开发者

What are docstrings called in java?

开发者 https://www.devze.com 2023-01-16 16:14 出处:网络
Before Java methods we have something like: /** * Takes a number and returns its square root. * @param x The value to square.

Before Java methods we have something like:

/**
 * 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) {开发者_JS百科
...
}

Does this have a name (like docstrings in Python)?


Actually, they are called document comments and javadoc is a tool to generate those comments into HTML.

You can find the structure of the Javadoc comment in Wikipedia (for example).


Yup, it's called javadoc.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号