/**
*@param context
*@param attrs
*/
Public DotView(Context context, Attribute attrs) {
super(context, attrs);
setFocusAbleInTouch(true);
}
Does the @param serve any purpose. I saw this code in an Android programming book, but the author didn't explain what the @param meant. I know it is inside a double line comment so I am assuming @param doesn't do anything to the outcome and it is there for readability. Am I right or wrong?
In Java, annotations are the tags that represent the metadata, which is attached with a class, interface, methods, etc., to indicate some special type of additional information that can be used by JVM and Java compiler. The @param annotation is a special format comment used by the javadoc that generates documentation.
In Spring MVC, the @RequestParam annotation is used to read the form data and bind it automatically to the parameter present in the provided method. So, it ignores the requirement of HttpServletRequest object to read the provided data.
@param will not affect testNumber.It is a Javadoc comment - i.e used for generating documentation . You can put a Javadoc comment immediately before a class, field, method, constructor, or interface such as @param , @return . Generally begins with '@' and must be the first thing on the line.
@param describes a parameter and @return describes the return value. (There are several other useful tags.) Remember that Javadoc generates documentation from your code, not just from your comments.
Does the @param serve any purpose
It is part of the JavaDocs documentation system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With