Using comments

Just as it is used (#) to allow the Perl interpreter to know that a line of code is a comment, you can specify the comments in Java

In fact, there are several ways to denote comments into Java

For one line of comments, you can use the “/ /” For example, consider the following code :

/ / Initialize variables …
int age = 28; / / Declare and initialize age

To enter comments from several lines, using the symbols “/ *” and “* /”, as seen in the example

/ *
This is a sample class that is used to demonstratethe use of multi – Online reviews.
It was written by Carlos Jordan for Learning Java
* /
/ * Set an Example class with a single
Main (), with the method to print
“Hello cyberspace!” to the standard output .
*/
public class Example
(Public static void main (String [] args)
(System.out.println ( “Hello cyberspace !”);
)
) < >

Finally, if you are writing reviews that should be included as part of a javadoc, you must use the “/**” “* /” combination as in the following example :

/ *
This is a kind of sample that is used to demonstratethe use of multi-line comments.
It was written by Carlos Jordan to learn Java. These comments do not appear in the documentation of java
* /
/ **
Example define a class with a single
main () method to print
“Hello cyberspace!” to the standard output.
This commentary appears in the javadoc.
* /

public class Example
(
public static void main (String [] args)
(
System.out.println ( “Hello cyberspace !”);
)
)




Related Posts

  1. Comments in PHP – php tutorial
  2. By screen printing
  3. JAVA FAQs
  4. Four ways to ensure you receive comments on your web blog
  5. Six plugins that will grow your comments at WordPress blog
  6. How to Erase Spam Comments in a Second at WordPress
  7. JAVA: That is according to Wikipedia
  8. JAVA AND SQL
  9. Implementation of Java platforms
  10. Java Runtime Environment – basic things
  11. Variables and Strings
  12. Java Socket’s Fundamentals – Ruby on Rails tutorial
  13. Books to learn WEB JAVA PROGRAMMING