20
While I was stirring the netbeans using language java I didn’t understand what that command was for /**
, I went in and something came up about Javadoc, I didn’t quite understand what that meant someone could explain to me?
20
While I was stirring the netbeans using language java I didn’t understand what that command was for /**
, I went in and something came up about Javadoc, I didn’t quite understand what that meant someone could explain to me?
16
To insert comments into the source code, in Java, you can use one of two ways:
// Comentário em uma única linha
/* Comentário
que se divide em várias
linhas
*/
When writing comments of the form (note the two asterisks in the first line)
/**
*
*/
Comments can be interpreted by a tool - called Javadoc - which generates documentation based on source code using, in addition to comments between /** */
, other special notes, such as @author
and @date
, which provide, respectively, authorship information and the date of creation of the file.
The article from Wikiedia provides a good idea about Javadoc.
To Java API is an example of documentation generated using the tool.
2
Complementing, follow some tags:
Browser other questions tagged java
You are not signed in. Login or sign up in order to post.
then this command only serves to comment more than one line?
– Nicolas
@Nicolas Editei the answer giving more details
– Beterraba
Interestingly, the
/**
is a mere/*
, the extra * is only part of the "commented" text, and is ignored by Java like any other character that is inside the comment, until a*/
. I mean, Javadoc’s 'staff" could have chosen/*#
,/*{
or even/*JD
, either makes the character, as long as it is within a multi-line comment (i.e., started by/*
).– Bacco