0
I had a Doubt Related To ( // )?? Help
If the Meaning of double slashes // means ingnoring that line then, why It is to be written in the coding ??? Please say
4 Answers
+ 2
Comments are used to add notes to your code so that the ones reading it later (including future you) may understand it more easily, or notes of things to do, suggestions for improvement, etc. You can also use comments to quickly dummy out a chunk of code you want to be able to put back easily.
+ 2
it can be used for reminders and readability int the code you are writing.
+ 1
It is written to make things clear. One who doesn't know the meaning of a particular statement in the program, can get an idea by looking at the comments.
+ 1
// /* */ These are only comments for your eyes to see. The compiler sees it and just doesn't bother doing anything. It ignores the comments completly.
// Single line comment
/* Multi line
comment */