|
|
|
|
|
|
|
|
|
|
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. Click 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.
Dan Velasco is a Senior Technical Editor for WebSpherePower Magazine and DominoPower Magazine. He's a Sun Certified Java Programmer, Sun Certified Web Component Developer and an IBM Certified Solution Developer for WebSphere Studio V5.0. He's also a Principal CLP Application Developer (R4, R5 and ND6) as well as a CLP System Administrator (R4 and R5). You can reach him via email at dvelasco@webspherepower.com or on the Web at http://DanVelasco.com.
[ Prev ]
|
|
|
|
|
|
-- Advertisement --
SECURE YOUR SITE WITH AN IRONCLAD SSL CERTIFICATE
An IronClad SSL Certificate helps you build an impenetrable fortress around your customer's credit card information. IronClad SSL Certificates are:
- Fully validated
- Up to 256-bit encryption
- One, two, or three year validity (our Turbo SSL Certificates are valid up to 10 years)
- 99% browser recognition
- Stringent authentication
- Around-the-clock customer support
Build trust. Protect your customers. Grow your online business.
Tap here now and be IronClad with SSL tonight. |
|
|
|
|
|
|
|