Forums Register Login

how to use /** */ comment type

+Pie Number of slices to send: Send
java has one comment ...

/** */


how to use that please give me one example for this ..

thanks
parul
+Pie Number of slices to send: Send
This is the java doc comment. You can use this comment to give information about the class, methods and attributes.

The java doc tool can extract these comments & give you a nice documentation.
+Pie Number of slices to send: Send


Below link directs to javadoc tool.

http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html

Arjun.
+Pie Number of slices to send: Send
Hi Parul,

I think Arjun has allready given you a very good example of Javadoc Comments.

JavaDoc comments are comments which are used by the Javadoc compiler when it uses code comments to prepare Javadocs for the programs developed by you.

Cheers,
Rahul
+Pie Number of slices to send: Send
 

Originally posted by parul bajaj:
java has one comment ...

/** */


how to use that please give me one example for this ..

thanks
parul



BTW, this is not the only style of comment in Java. There are also // and /* ... */ comments that are exactly the same as in C++ (if you are familiar with that language). The // style comments are for a single line. The /* ... */ comments are for multiple lines. As described above, /** ... */ comments have special meaning for the Javadoc tool. You should google to find out what syntax is available for Javadoc-style comments. For one thing, you can include HTML tags since the Javadoc tool generates HTML pages for the documentation. You can also use special Javadoc tages such as @author, @return, @param, and @throws. I suggest you follow the link above to learn more about how to use these Javadoc tags.

Layne
+Pie Number of slices to send: Send
Hi Parul,

Have all this helped you.

Cheers,
Rahul
+Pie Number of slices to send: Send
One more point:

Have you ever read or browsed the Java APIs? They are created with javadoc.
+Pie Number of slices to send: Send
 

/** * The javadoc tool helps to generate a java documentation.<br> * @author James * @version 1.5 * @Deprecated java.lang.Thread.stop()<br> * @code pack1.SourceCode * @see <a href="http://java.sun.com">clickMe</a> * */ . . . /** * * @return Object * @see package.class#returnInt * @since 1.1 * @throws java.lang.InterruptedException * */public Object returnObj(int one, String str, Object obj) { . . . return obj;}



this is the comment style one should use if one wants an API like html of one's class
+Pie Number of slices to send: Send
oops sori bout my last post the quote did not paste accurately pls check earlier posts.
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 948 times.
Similar Threads
Document Accessors ? A matter of Style
Change & sort the contents of JComboBox in Swing
non-static block
Disable deploying MDB in ear file in Jboss
PASSED IBM 157 EXAM
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:13:00.