Java provides three styles of comments : Comments « Java Source And Data Type « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Java Source And Data Type » Comments 
1.2.1.Java provides three styles of comments
/* This is a
   multiline comment. */
   
// This is a single-line comment.
   
/** This is a
    multiline javadoc comment */

The first comment style supports traditional C-language comments. 
The second comment style supports single line C++ comments. 
The third comment style is used by the javadoc documentation generation tool. 


/*
 File header
*/
public class MainClass{
    /**
       This is a method
    */
    public static void main(String[] argv){
        // output
        System.out.println();

    }
}
1.2.Comments
1.2.1.Java provides three styles of comments
1.2.2.Comments cannot be nested.
1.2.3.Comments can appear at the beginning or end of any line in the source code file
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.