Javadocs allow you to generate HTML documentation from your source files. The online API documentation is the result of running a javadoc on the source code of a standard Java library, much like this HTML page here.
To declare a comment as a Javadoc, simply use one of the following notations:
/** Javadoc Comments */ /** Javadoc Comments */ /** * * Javadoc Comments * */
Anything that goes within these comments are valid for Javadoc. To attach the comments to our code, we place them directly before classes, constructors fields, interfaces and methods.
Tags allow Javadoc to know what type of information will follow. Here is a list of common pre-defined tags:
Now that we know the fundamentals of declaring a javadoc and the tags that go with, let's learn how to apply them to a typical class.
Command Line Kung Fu is packed with dozens of tips and practical real-world examples. You won't find theoretical examples in this book. The examples demonstrate how to solve actual problems. The tactics are easy to find, too. Each chapter covers a specific topic and groups related tips and examples together.$ Check price
A book that is simple, direct, terse with easy examples. Simple example programs to guide you as you go, with test exercises at the end for you to judge for yourself how well you understand the program. Learn java faster and efficiently with Java: A Beginner's Guide.$ Check price