gpt4 book ai didi

java - 我应该如何记录参数 "says"?

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:37:40 26 4
gpt4 key购买 nike

无法解决问题:\我应该如何记录第二个参数“says”?因为 SonarQube 一次又一次地问我这个问题。

public class Dogs {

private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(Dogs.class);
private final String name;
private final String says;

/**
* The Dogs class.
*
* @param name
* says. // here the problem
*
*/
public Dogs(final String name, final String says) {
this.name = name;
this.says = says;
}

}

最佳答案

你应该在参数名前面加上@param,像这样:

/**
* The Dogs class.
*
* @param name explain what is it !
* @param says explain what is it !
*
*/
public Dogs(final String name, final String says) {
this.name = name;
this.says = says;
}

关于java - 我应该如何记录参数 "says"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54383739/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com