Wednesday, December 12, 2007

ICA-CP: 12/12/07 - Javadocs

Good morning!

Today is a review Q & A opportunity before your quiz on Friday. We also try Javadocs today. Javadocs is one way to explain how your program works to users.

To make Javadocs, you use a new multi-line comment. It is: /** my comments go here **/. Javadocs recognizes these symbols and puts the information you type in them into a Java document. Here's a link to more info on Javadocs: http://www.javapractices.com/Topic60.cjp

To see how BlueJ creates a Javadoc for your program, create a new class. In BlueJ, click the New Class button, and name the class myJavadoc. Open the class to edit. In these two lines,
* @author (your name)
* @version (a version number or a date)

replace the info with your name and today's date. Now, compile it. Once compiled, go to Tools --> Toggle Documentation View. You will see the Javadoc that you just created. To get back to editor, go to Tools --> Toggle Documentation View again.

0 Comments:

Post a Comment

<< Home