Q&A

Q1:The official Java documentation is filled with long paragraphs that describe classes and methods. How can these be produced using javadoc?
A1: In the Java documentation creator, there's no limit to the length of a description. Although they're often as brief as a sentence or two, they can be longer if necessary. End the description with a period, immediately followed by a new line with a tag of some kind or the end of the comment.
Q2:Do I have to document everything in my Java classes if I'm planning to use the javadoc tool?
A2: The Java documentation creator will work fine no matter how many or how few comments you use. Deciding what elements of the program need to be documented is up to you. You probably should describe the class and ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH 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.