2. Comments
// this is a single comment
/*this is a block comment
* it can be more than one line
*/
/** this is a javadoc comment
*It is used to display the longer comment
*We can generate a html page by using javadoc command in CMD
*/
3. Examples
/* UnicodeCommentDemo.java
* Java programs are written using Unicode characters
* Unicode presenting a character recognized as usual Java token
*/
public class ClassBExcersise
{
public static void main(String[] args)
{
// The method will print hello java in console
System.out.println(“hello java”);
}
}
Paragraph comment example
Single line comment example