What is the /** code in java language for?


While I messed with netbeans using java language I didn't understand what this command was for /** , I went back and something about Javadoc appeared, I didn't quite understand what it meant could someone explain to me?


To insert comments in 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

When writing form comments (note the two asterisks in the first line)


Comments can be interpreted by a tool – called Javadoc – which generates documentation based on the source code using, in addition to the comments between /** */ , other special annotations, such as @author and @date , which provide, respectively, information of authorship and the creation date of the file.

The wikipedia article provides a good understanding of Javadoc.

The Java API is an example of documentation generated using the tool.

Scroll to Top