Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 In Java; how would you do comment lines?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hosamhelal




PostPosted: Fri Feb 25, 2005 5:12 pm   Post subject: 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?
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Fri Feb 25, 2005 5:40 pm   Post subject: (No subject)

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:
code:
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:
code:
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 J2SE API Reference Documentation
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: