+ 1
What is the use of COMMENT tag when it is not get displayed on output <!--why?-->
4 Answers
+ 1
I used to program strictly in JS and I constantly used comments, just to keep track and explain things I didn't fully understand.
For example: System.out.printIn("Hello world!"); //Idk what went wrong!!
Later after research you find that it's printLn, not printIn -this is actually my rookie mistake.. like I said, i used JS, not Java- and you can use the comment to easily find the line you were at, and even leave a note for yourself next time! đ Hope this helps!
+ 11
You can use comments to explain your code, which can help you when you edit the source code at a later date. This is especially useful if you have a lot of code or working with others on a big project.
+ 2
The use of COMMENT tag is to making your code understandable for you and as well as for others...
+ 1
you may not be the one who edits the code later. Maybe you got a new job some where else. Maybe you have to edit someone else's code. having comments explaining what sections were intended to do what will make debugging easier