+ 2
WHAT IS THE USE OF MULTI-LINE COMMENTS?
PLEASE EXPLAIN ME IN DETAIL WHAT IS THE USE OF MULTI-LINE COMMENTS??
5 Respuestas
+ 4
There are 3 types of comments in java. The single line comment is used to comment only one line. The multi line comment is used to comment multiple lines of code. The documentation comment is used to create documentation API.
Use // text when you want to comment a single line of code. Use /* text */ when you want to comment multiple lines of code. Use /** documentation */ when you would want to add some info about the program that can be used for automatic generation of program documentation
https://www.javatpoint.com/java-comments
+ 4
Sometimes you want or need to write a lot of comments to explain certain parts of code.
Then multiline comment syntax is just more convinient for the programmer than typing // in every single line.
+ 4
next day you will be able to read your code with the help of those notes you left :)
+ 3
Multi line comments are typically used as a precursor to what a function does (placed above a function).
+ 2
Generally comments are used to explain what the code is doing,java supports both single and multiline comments additionally we have another one that is documentation comment which explains the external documentation of the code..multi line comment lines are used to write multiple lines of comments and declared with /* multiple line comments*/........