Share this page 

Display a comment in a JavadocTag(s): Environment


Use the numerical identity to represent the / in the javadoc section to avoid any conflict with a real comment.
import java.awt.*;
public class Example {
  /**
   * Simple Frame
   * <pre>
   * &#47;* create a frame *&#47;
   * Frame f = new Frame()
   * </pre>
   * @param args
   */
  public static void main(String args[]){
    Frame f = new Frame();
    f.setSize(200,200);
    f.setVisible(true);
  }
}
and the javadoc output is :

You can represent any character with a numerical identity, the syntax is &#nnn; where nnn is the Unicode code (decimal value) of the character.