Java Documentation Comments

Basically there are three types of comments available in Java, these are:

Java Documentation Comments Example

Here is an example program, showing some documentation comments in Java, such as @author, @version, and @since

/* Java Program Example - Java Documentation Comments
*
* @author  Richard Jones
* @version 1.0
* @since   2014-03-31 
*
*/

public class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("Hello World. This is documentation comments tutorial.");
    }
}

Here is the output produced by the above Java program:

java documentation comments

Java Online Test


« Previous Tutorial fresherearth Home »