|
|
|
|
|
|
|
|
Commenting Java code the WebSphere way (continued)
The second type of comment, the multi-line comment, needs to be enclosed between "/*" and "*/" characters. This can come in handy if you have a large block of code you need to comment out, but make sure you still consider the WebSphere Studio way of commenting mentioned above since you can undo it without having to actually edit the code. There is no way, as far as I can tell, to automatically insert a multi-line comment using WebSphere Studio.
The third type of comment, the Javadoc comment, is enclosed between "/**" and "*/" characters. The reason it is different than a multi-line comment is that a Javadoc comment is used by the javadoc tool to create documentation about your program. Using WebSphere Studio you can also automatically generate the skeleton of a Javadoc comment that you can modify. Simply right click either within a method or within a class and select Source --> Add Javadoc Comment. You can how this is done and the resulting code that is added in Figure C.
FIGURE C
 
You can also automatically generate the skeleton of a Javadoc comment that you can modify. Roll over picture for a larger image.
Commenting your Java code seems like a simple task, but making sure you keep it as simple as possible will help ensure that it actually gets done. Let WebSphere Studio take some of the work off of your shoulders and save you some typing.
|
|
|
|
|
|
|
|
|
|
|