Geek Geek - 10 months ago 50
HTML Question

<tt> vs <code> elements when writing Java docs

To represent

while writing Java Docs should I use the
element or the
element? Are there specific situations when one should be preferred over the other?


For inline code in Javadocs,you should use {@code your-code-here}

See javadoc - {@code text} for more details.

Equivalent to <code>{@literal text}</code>.

Displays text in code font without interpreting the text as HTML markup or nested javadoc tags. ..