In this tutorial, we are going to learn about how to write a multiline comments in Java.
In Java, we can write a single-line comment by using the two forward slashes
// followed by the comment.
// this is a single line comment
Multiline comments in Java starts with
/* and ends with
Any text we can add between
*/ is ignored by the java compiler
Here is an example:
/*you can see mee in multiple lines*/
In the eclipse code editor, we can use the following keyboard shortcut to comment multiple lines.
Ctrl + Shift + /