O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

Here is an example of the HTML5 tags used for Javadoc comments:

/**<h2>Returns the weight of the car.</h2><article>  <h3>If life would be often that easy</h3>  <p>    Do you include unit of measurement into the method name or not?  </p>  <p>    The new signature demonstrates extensible design of an interface.  </p></article><aside>  <p> A few other examples could be found    <a href="http://www.nicksamoylov.com/cat/programming/">here</a>.  </p></aside>* @param weightUnit - an element of the enum Car.WeightUnit* @return the weight of the car in the specified units of weight*/int getMaxWeight(WeigthUnit weightUnit);

If you are using IntelliJ IDEA, go to Tools | Generate JavaDoc... and set the -html5 value in the Other command line arguments ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required