Using the HTML5 Javadoc

The Javadoc tool has been updated for the modern Java platform, defined as Java 9 and later. It can generate HTML 5 markup output in addition to HTML 4. The Javadoc tool provides support for both HTML 4 and HTML 5. HTML 5, as of Java 10, is the default output markup format.

The following short Java application simply generates a 319-wide by 319-high frame. It is shown here without any Javadoc tags, which we will discuss later in this section:

import javax.swing.JFrame;import javax.swing.WindowConstants;public class JavadocExample {  public static void main(String[] args) {    drawJFrame();  }  public static void drawJFrame() {    JFrame myFrame = new JFrame("Javadoc Example");    myFrame.setSize(319,319); myFrame.setDefaultCloseOperation( ...

Get Mastering Java 11 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.