Saturday, 20 January 2018

JavaDoc: @value: Display constant values

@value tag is used to display constant values.

The values of all the constants that are tagged with @value tag are displayed in 'Constant Field Values' section.

Arithmetic.java

package com.java.tags;

/**
 * 
 * @author Hari Krishna
 * 
 * @since 1.0
 */
public interface Arithemtic {

 /**
  * The value of PI is {@value}
  */
 public static final double PI = 3.14;

 /**
  * 
  * @param radius
  *            Radius of the Circle
  * 
  * @return area of the circle.
  * 
  * @since 1.1
  */
 public double areaOfCircle(int radius);

}



Previous                                                 Next                                                 Home

No comments:

Post a Comment