如果我使用<;br>;在JavaDocs中?

如果我使用<;br>;在JavaDocs中?,java,comments,javadoc,Java,Comments,Javadoc,我最近开始在Java上编码,我经常看到用于分隔行的单个标记。但出于我的目的,我实际上不想写“段落”,只想换行,这样读文档就不会那么糟糕了。标签是否可以接受 最后,我提出了3种适合该项目的文档样式。我为什么会被杀 代码内部看起来不错,文档查看效果不好 /** * <p> Does highly important adorable things. </p> * <p> Not only helping fields in being suitab

我最近开始在Java上编码,我经常看到用于分隔行的单个
标记。但出于我的目的,我实际上不想写“段落”,只想换行,这样读文档就不会那么糟糕了。

标签是否可以接受

最后,我提出了3种适合该项目的文档样式。我为什么会被杀

  • 代码内部看起来不错,文档查看效果不好

    /**
     * <p> Does highly important adorable things.      </p>
     * <p> Not only helping fields in being suitable
     *     for stack overflowing, but also loves cats. </p>
     * <p> Please do not call while there are
     *     some elephants in the main class.           </p>
     */
    
    /**
     * Does highly important adorable things. <p>
     * Not only helping fields in being suitable
     * for stack overflowing, but also loves cats. <p>
     * Please do not call while there are
     * some elephants in the main class.
     */
    
    /**
     * Does highly important adorable things. <br>
     * Not only helping fields in being suitable
     * for stack overflowing, but also loves cats. <br>
     * Please do not call while there are
     * some elephants in the main class.
     */
    
    /**
    *做非常重要的可爱的事情

    *不仅有助于领域的发展 *为堆积如山,还爱猫

    *有电话时请不要打电话 *一些大象在主班

    */
  • 在代码和文档查看中看起来很糟糕

    /**
     * <p> Does highly important adorable things.      </p>
     * <p> Not only helping fields in being suitable
     *     for stack overflowing, but also loves cats. </p>
     * <p> Please do not call while there are
     *     some elephants in the main class.           </p>
     */
    
    /**
     * Does highly important adorable things. <p>
     * Not only helping fields in being suitable
     * for stack overflowing, but also loves cats. <p>
     * Please do not call while there are
     * some elephants in the main class.
     */
    
    /**
     * Does highly important adorable things. <br>
     * Not only helping fields in being suitable
     * for stack overflowing, but also loves cats. <br>
     * Please do not call while there are
     * some elephants in the main class.
     */
    
    /**
    *做非常重要的可爱的事情
    *不仅有助于田地变得适宜
    *为堆积如山,还爱猫
    *有空时请不要打电话
    *一些大象在主班。
    */
    
  • 在代码和文档查看中看起来不错

    /**
     * <p> Does highly important adorable things.      </p>
     * <p> Not only helping fields in being suitable
     *     for stack overflowing, but also loves cats. </p>
     * <p> Please do not call while there are
     *     some elephants in the main class.           </p>
     */
    
    /**
     * Does highly important adorable things. <p>
     * Not only helping fields in being suitable
     * for stack overflowing, but also loves cats. <p>
     * Please do not call while there are
     * some elephants in the main class.
     */
    
    /**
     * Does highly important adorable things. <br>
     * Not only helping fields in being suitable
     * for stack overflowing, but also loves cats. <br>
     * Please do not call while there are
     * some elephants in the main class.
     */
    
    /**
    *做非常重要的可爱的事情
    *不仅有助于田地变得适宜 *为堆积如山,还爱猫
    *有空时请不要打电话 *一些大象在主班。 */

也许一个更干净的选项是使用
(它保留格式):

/**
 * <pre>
 * Does highly important adorable things.
 * Not only helping fields in being suitable
 * for stack overflowing, but also loves cats.
 * Please do not call while there are
 * some elephants in the main class.
 * </pre>
 */
/**
* 
*做非常重要的可爱的事情。
*不仅有助于田地变得适宜
*为堆积如山,还爱猫。
*有空时请不要打电话
*一些大象在主班。
* 
*/

就个人而言,我会将结果与口译员的最佳输出一起使用,而不是代码。但是,P是一个容器标记,因此您需要

。对于br,我将使用
。不过,您可以在标记周围添加新行,从而使代码更加友好。
任何人?您不需要询问队友和用户吗?他们的观点似乎更为中肯(个人而言)不太喜欢在整个javadoc中使用它。java.lang.Long#parseLong很好地使用了Prefer
to
来获得有效的html代码(第一个代码已关闭)