
-----------------------------------
hosamhelal
Fri Feb 25, 2005 5:12 pm

In Java; how would you do comment lines?
-----------------------------------
How can you put comment lines in Java?

in turing:

%Nice program
%By Me

How would you do that in Java?

-----------------------------------
rizzix
Fri Feb 25, 2005 5:40 pm


-----------------------------------
There are 3 types of comments in java:

the Line Comment: this type of comment starts with a // and ends at the end of line (just like the turing %). It i used as follows: someJavaCode(); // all this part is commented of

the Comment Block:  this type of comment begins with a /* and ends with a */ and it can span multiple lines: It is used as follows: someJavaCode(); // a line comment
/* here begins
    the block comment 
    and here shall it end */

the In-Code Documentation Comment: this type of comment is smilar to the Comment Block except that it strarts of with a /** (yes a double astrick) and is used for a different purpose. Special @tags can be used within such a comment  that get parsed by the javadoc tool and result in an html-based documentation files, like the [url=http://java.sun.com/j2se/1.5.0/docs/api/]J2SE API Reference Documentation
