+ 2

WHAT IS THE USE OF MULTI-LINE COMMENTS?

PLEASE EXPLAIN ME IN DETAIL WHAT IS THE USE OF MULTI-LINE COMMENTS??

29th Oct 2018, 3:53 PM
TUSHAR
TUSHAR - avatar
5 Réponses
+ 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
30th Oct 2018, 2:37 AM
deepak sharma
deepak sharma - avatar
+ 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.
29th Oct 2018, 4:00 PM
Matthias
Matthias - avatar
+ 4
next day you will be able to read your code with the help of those notes you left :)
13th Nov 2018, 3:58 AM
Amrita Upadhyay
Amrita Upadhyay - avatar
+ 3
Multi line comments are typically used as a precursor to what a function does (placed above a function).
13th Nov 2018, 6:41 AM
Brian Thompson
Brian Thompson - avatar
+ 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*/........
14th Nov 2018, 1:05 PM
Nandyala Priyanka
Nandyala Priyanka - avatar