Search WebSpherePower's 6,973 WebSphere, Java, and Eclipse article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


« Previous  ·  1  ·  2
Other articles you might like
Home > Java (6 articles)
   Locate your JDBC DataSource in WebSphere Application Server using JNDI
   Use WebSphere to develop Java applications for Palm handhelds
   A simple introduction to J2EE
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent WebSpherePower Articles
A perfect 10: celebrating 10 years online
You can help bring security and safety back to White House email
Introducing the WebSpherePower RSS feeds
From New Jersey to Palm Bay, Florida
A WebSphere pot o' gold
How Elvis entered the building and CES went out the window
WebSphere Application Server 6: what's it all mean?
WebSpherePower News
Legal question: Can HP keep Hurd from going to Oracle?
Caringo announces integration with Symantec EV 9.0
Cisco & Citrix marry on virty PCs
Take Heed, Tech Giants: Edison's Failed Plot To Hijack Hollywood
IBM code unchains virtual workloads
Oracle names H-P ex-CEO Mark Hurd as co-president
Cloud Messaging Provider, Linxter, Releases SDK for Java and Android
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Introducing the Jones family and their full-family backup challenges
David Gewirtz Online: CNN commentary and analysis
DominoPower: Lotus must open source Notes and Domino
OutlookPower: Hands on debugging a broken Outlook forwarding rule
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login