Computer Science, asked by gouthamswa3030, 1 year ago

How do you add comments to java program?

Answers

Answered by SMCREATION
1
How do you comment in Java?

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.

Answered by atrs7391
0

You can add comments in Java by using these three symbols according to the use:

1. / / - / / this is a single line comments

2. / *  * / - / * this is multiline comments * /

3. / * *  * * / - / * * this is documentation comments * * /

Similar questions