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

25th Oct 2016, 6:42 AM
PRINCE SURESHKUMAR PATEL
PRINCE SURESHKUMAR PATEL - avatar
4 Antworten
+ 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.
25th Oct 2016, 8:58 AM
Zen
Zen - avatar
+ 2
it can be used for reminders and readability int the code you are writing.
9th Nov 2016, 5:22 AM
julio
+ 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.
25th Oct 2016, 7:14 AM
Keyur Kumbhare
Keyur Kumbhare - avatar
+ 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 */
25th Oct 2016, 8:09 AM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar