How can I use “<” and “>” in javadoc without formatting?

前端 未结 8 1905
面向向阳花
面向向阳花 2020-12-02 13:56

If I write in a javadoc, it does not appear, because tags have special functions on formatting texts.

How can I show this chars in a

8条回答
  •  情话喂你
    2020-12-02 14:40

    You only need to use the HTML equivalent for one of the angle brackets. The < can be represented as either < or <. Here's a sample taken from real Javadoc:

    <complexType>
      <complexContent>
        <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
          <sequence>
          [...]
    

    This displays as:

    
       
         
           
    

提交回复
热议问题