Javadoc关闭标签

时间:2015-11-18 18:36:19

标签: java javadoc

阅读Oracle's Javadoc Documentation,我注意到作者没有关闭<p>标记。

/**
 * The method used for creating the tree. Any structural 
 * modifications to the display of the Jtree should be done 
 * by overriding this method.
 * <p>
 * This method adds an anonymous TreeSelectionListener to 
 * the returned JTree.  Upon receiving TreeSelectionEvents, 
 * this listener calls refresh with the selected node as a 
 * parameter. 
 */
public JTree makeTree(AreaInfo ai){
}

文档说明:

  

如果您在文档评论中有多个段落,请将段落与<p>段落标记分开,如图所示。

在Eclipse中,Javadoc格式正确,但仅仅因为它有效,它是否意味着它是“正确的”?

1 个答案:

答案 0 :(得分:13)

是的,这是对的。引自the specifications

  

某些HTML元素类型允许作者省略结束标记(例如,P和LI元素类型)