Comments on Java
Comments are notes written at code for the purpose of documentation materials. This text is not part of the program and did not affect the course of the program.
Java supports three types of comments: C + + style single line comments, C style multiple lines, and special javadoc comments
Comments are notes written at code for the purpose of documentation materials. This text is not part of the program and did not affect the course of the program.
Java supports three types of comments: C + + style single line comments, C style multiple lines, and special javadoc comments
1. Writing Comments in C + +
C + + style comments begin with / /. All text after / / is considered as a comment. For instance,
/ / This is a C + + style or single line comments
2. Writing comments on C
C-style comments or also called the comment a few lines begin with / * and end with * /. All text that is between two marks is considered a comment. Unlike C + + style comments, it can reach a few lines. For example,
/ * This is an exmaple of a
C style comments or multiline * /
3. Special comments javadoc
Special Javadoc comments are used to generatisasi HTML documentation for your Java program. You can create a javadoc comment lines begin with / ** and end with * /. Like comments C_style, it can also reach out to a few lines. It can also be composed of the tags to add more information on your comment. For example,
/ **
This is an example of special java doc comments used for \ n
generating the html documentation. It uses tags like:
@ author Florence Balagtas
@ version 1.2
* /
10:51 PM
Wardana
Posted in: 

0 comments:
Post a Comment