Make your own free website on Tripod.com

 

Welcome to Petar Knezevich's Java Page

Oddly enough I will begin with Java's documentation comment system, Javadoc. Documentation is very important to other programmers when you will be distributing code. It is also important to you, the original programmer, when you examine code that you wrote months or even years before.

JavaDoc

Javadoc is a documentation method, and application that ships with the Java Development Kit (JDK). When writing Java code, you have three methods of including comments:

C style

	/*
	   This is comment style number one.  It can
	   span many lines.  Everything between the
	   openning and closing forward-slash/asterix
	   pair is a comment.
	 */

C++ style

	// This is comment style number two.  Everything
	// that comes after the double forward-slashes
	// is a comment.

Javadoc style

	/**
	 * This is comment style number three.  The extra
	 * asterix in the openning tag identifies this as
	 * a Javadoc comment.  Running the javadoc
	 * application on your source code will create a
	 * set of HTML files based on the text placed
	 * between these tags.
	 */

Here are some of the tags that Javadoc uses.

Here are some examples of Javadoc comments.

You can go back to front.