O'Reilly logo

Scala for Java Developers: A Practical Primer by Toby Weston

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

© Toby Weston 2018
Toby WestonScala for Java Developershttps://doi.org/10.1007/978-1-4842-3108-1_5

5. ScalaDoc

Toby Weston
(1)
London, UK
 
Scala has ported the idea of JavaDoc and creatively called it ScalaDoc . Adding ScalaDoc to your Scala source works similarly to adding JavaDoc, and is done with markup in comments (see Figure 5-1). For example, the following fragment in source code
  /** Returns `true` if this value is equal to x, `false` otherwise. **/
  def ==(x: Byte): Boolean
…can be turned into the following fragment in HTML :
A456960_1_En_5_Fig1_HTML.jpg
Figure 5-1
Embedded ScalaDoc markup gets rendered in HTML
To see the documentation for the Scala Library API, head ...

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