THere are two main kinds of comments single line and multi line,
An example of single line is:
//single line comment
A single line comment is often used to explain obscure code, so code where it isnt necessarily intuitive what it does.
A example of multi line is:
/**
*multi line comment
*
*
*/
Another form is:
/*
*
*/
The former example of multi-line comment are used for api documentation using the javadoc tool. While the latter is just a way to make a comment multiple lines and should be avoided as much as possible since it makes the code more clunky and generally the better pieces of programming can easily be understood as long as you do api documentation.
The format for api documentation is basically
/**
*<p>explanation of method</p>
*@param parameter
*@param parameter
*@return what the return is suppose to be
*/
Although it differs depending on what it is for example normally there is a comment before the beginning of a class explaining the class’s purpose and who the author is.
The video on comments is below